Skip to content

Add option to pass na_filter into pd.read_csv() - Dealing with CSV containing NA as string #44

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

Open
dazzag24 opened this issue Jan 8, 2019 · 1 comment

Comments

@dazzag24
Copy link

dazzag24 commented Jan 8, 2019

I have a CSV detailing info about airports. The country code column is encoded using 2 character ISO-3166 codes. https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes

It turns out that the code for Namibia is "NA" and this results in the values being stripped as it converts from CSV to SQLite DB.

I was able to solve this by adding na_filter=False to the pd.read_csv() call in utils.py

return pd.read_csv(

Would you consider adding an option to allow this flag to be passed into the pd.read_csv call?

Thanks
Darren

@frafra
Copy link

frafra commented May 26, 2022

I agree, I have the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants