ping#
- class pdcleaner.detection.web.ping(obj, detector=None)[source]#
Bases:
_ObjectTypeSeriesDetectorDetect strings that do not match a reachable url.
Intended to be used by the detect method with the keyword ‘ping’
>>> series.cleaner.detect.ping(...) >>> series.cleaner.detect('ping',...)
This detection method flags values as potential errors wherever the corresponding Series element does not match a reachable url.
Note
Missing values (NaN) are not treated as errors
Examples
>>> series = pd.Series(['google.com','https://www.google.com/', 'dummy']) >>> detector = series.cleaner.detect.ping() >>> print(detector.detected()) 0 google.com 2 dummy dtype: object
Attributes Summary
Indices of the rows detected as errors
Number of rows detected as errors
The object (Series or DataFrame) containing the data to which the detection is applied
Methods Summary
detected()Series or DataFrame containing only the detected errors
Returns True if any error has been detected, False otherwise
is_error()Return a boolean same-sized object indicating if the values are flagged as errors
Return a boolean same-sized object indicating if the values are NOT flagged as errors
report()prints a detection report
valid()Series or DataFrame containing only the valid values
Attributes Documentation
- index#
Indices of the rows detected as errors
- n_errors#
Number of rows detected as errors
- name = 'ping'#
- obj#
The object (Series or DataFrame) containing the data to which the detection is applied
Methods Documentation
- detected()#
Series or DataFrame containing only the detected errors
- has_errors() bool#
Returns True if any error has been detected, False otherwise
- is_error() Series#
Return a boolean same-sized object indicating if the values are flagged as errors
- not_error() Series#
Return a boolean same-sized object indicating if the values are NOT flagged as errors
- report()#
prints a detection report
- valid()#
Series or DataFrame containing only the valid values