Skip to content

Excel parser cannot change *keep_default_na* value #4131

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

Closed
davidshinn opened this issue Jul 5, 2013 · 3 comments · Fixed by #4139
Closed

Excel parser cannot change *keep_default_na* value #4131

davidshinn opened this issue Jul 5, 2013 · 3 comments · Fixed by #4139
Labels
Bug IO Data IO issues that don't fit into a more specific label
Milestone

Comments

@davidshinn
Copy link
Contributor

The parse method in the ExcelFile class does not pass the argument keep_default_na to the TextParser from pandas.io.parsers. There is no clean way to override the default na values when parsing excel files with the current code.

My specific problem involves "NA" as a typical value for "North America" in excel files.

@jtratner
Copy link
Contributor

jtratner commented Jul 5, 2013

@davidshinn I think #4139 should fix this - just changed parse and _parse_excel to pass keyword arguments through

@davidshinn
Copy link
Contributor Author

@jtratner This fixes the problem perfectly and other potential kwds missing from upstream functions. I'm extremely impressed with the quick commits. On another note, I noticed that because this doesn't specifically add the keyword argument, the feature is not as visible through ipython tab completion and introspection. However from my perspective, the main issue is closed. Maybe I'll tackle those niceties myself. Thanks.

@jtratner
Copy link
Contributor

jtratner commented Jul 6, 2013

@davidshinn Especially now that ipython offers tab completion on keyword arguments, I agree. The sole issue with doing this is that it adds a little overhead to making sure that the default arguments of TextParser and ExcelFile.parse match up later on.

davidshinn added a commit to davidshinn/pandas that referenced this issue Jul 7, 2013


1bd8f57 resolves pandas-dev#4131 without
updating docstrings in relevant functions.  No way to know that keep_default_na
and verbose are valid keyword arguments without inspecting the parsers.py code
and documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug IO Data IO issues that don't fit into a more specific label
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants