email#
- class pdcleaner.detection.web.email(obj, detector=None)[source]#
Bases:
pattern‘email’: Detect strings that do not match an email.
Intended to be used by the detect method with the keyword ‘email’
>>> series.cleaner.detect.email(...) >>> series.cleaner.detect('email',...)
This detection method flags values as potential errors wherever the corresponding Series element does not match an email.
Note
Missing values (NaN) are not treated as errors
Examples
>>> series = pd.Series(['john_856_doe@gmail.com','john_doe','np.nan','john?doe@gmail.com']) >>> detector = series.cleaner.detect.email() >>> print(detector.detected()) 1 john_doe 2 np.nan 3 john?doe@gmail.com dtype: object
Attributes Summary
Case sensitivity
Usage of Regex module flags
Indices of the rows detected as errors
'match', 'fullmatch' or 'contains'
Number of rows detected as errors
The object (Series or DataFrame) containing the data to which the detection is applied
Character sequence or regular expression used to detect errors
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
- case#
Case sensitivity
- flags#
Usage of Regex module flags
- index#
Indices of the rows detected as errors
- mode#
‘match’, ‘fullmatch’ or ‘contains’
- n_errors#
Number of rows detected as errors
- name = 'email'#
- obj#
The object (Series or DataFrame) containing the data to which the detection is applied
- pattern#
Character sequence or regular expression used to detect errors
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