-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Bug: Export to Stata NaN not converted to "." #6684
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
Comments
@jreback can you explain a little more what you'd like me to do...I am still a newbie in the GitHub problem solving scheme. |
This will need to be compares to master in pandas (the pre-release of 0.14). I did a lot of work around missing values, and there were (iirc) some issues regarding some dara types (e.g. doubles). |
@ozak I was suggesting building with master from the main repo http://pandas.pydata.org/developers.html#working-with-the-code then you could help explore where the error is |
ok will mark as a bug |
Writing last test for patch now. |
Wow that was fast! I guess this means this is solved? |
@Azak Once the referenced patch gets pulled into master, then the master, and later 0.14, will not have this issue. |
Hi,
I noticed that when exporting data to stata the
NaN
values are not always converted to Stata missing values but instead left blank. This somehow confuses Stata which does not allow using thedestring
command to solve the problem nor usingreplace value=. if value==.
.As an Example I downloaded the World Development Indicators and used the following commands to export National Savings to an the excel and csv file:
If you import the data into Stata (I am using v.13) and run the following commands, things fail.
As you can see Stata does not perform the analysis, even though it correctly recognizes the missing values. But not all of them are presented as ".". If one imports the the csv version into Stata and runs the same initial commands it works fine.
Furthermore, for some reason the index is still present in the stata file, even though I had used the
write_index=False
option.I am using Enthought's Canopy distribution on OSX Mavericks with Pandas '0.13.1'. Haven't tried on other Python dists.
The text was updated successfully, but these errors were encountered: