Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean_phone module doesn't recognize e.164 extension format #850

Open
yukewang1 opened this issue Mar 14, 2022 · 1 comment
Open

clean_phone module doesn't recognize e.164 extension format #850

yukewang1 opened this issue Mar 14, 2022 · 1 comment
Assignees
Labels
type: bug Something isn't working

Comments

@yukewang1
Copy link

Describe the bug

The E.164 standards state that phone numbers can be written in a format of +<CountryCode><City/AreaCode><LocalNumber>;ext=<ext>. An example could be +19052223333;ext=555. The current clean_phone() function doesn't recognize such numbers because this rule is not specified in the regex at line 16, clean_phone.py.

To Reproduce
Steps to reproduce the behavior:

from dataprep.clean import clean_phone
import pandas as pd

df = pd.DataFrame({
    "phone": ["+19052223333;ext=555"]
})

clean_phone(df, "phone", output_format="e164")

Expected behavior
The correct output should be +12345678901 ext. 1234 where as it doesn't regonize this format and outputs np.NaN.

Screenshots
Screen Shot 2022-03-13 at 23 31 58

Desktop (please complete the following information):

  • OS: macOS Monterey
  • Browser: Chrome
  • Platform: Jupyter Notebook
  • Platform Version: 6.4.8
  • Python Version: 3.9.9
  • Dataprep Version: 0.4.2

Additional context
Here's a blog explaining e.164 standards, specifically about how to specify an extension. Link

@yukewang1 yukewang1 added the type: bug Something isn't working label Mar 14, 2022
@yixuy
Copy link
Collaborator

yixuy commented Mar 31, 2022

Good catch! Thanks for your context, we will fix it soon!

@yixuy yixuy self-assigned this Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants