-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
add fix for opening zero observation dta files #7369
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
Conversation
needs a test for doing this (e.g. write an empty frame then read it back in and compare), put in |
you can also add your test file to the repo (same place as existiing test files) |
OK, I've added a test. I've left out my file, because generating the empty file seems to work just fine. Let me know if something isn't right as I'm new to git. |
@@ -72,6 +72,13 @@ def read_dta(self, file): | |||
def read_csv(self, file): | |||
return read_csv(file, parse_dates=True) | |||
|
|||
def test_read_empty_dta(self): | |||
empty_ds = DataFrame(columns=['unit']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add the comment GH 7369 here
add a note in Bug Fixes in v0.14.1.txt otherwise looks good |
OK. Thanks for the help. |
ok looks fine pls squash down to a single commit |
OK. I think that worked. |
@bquistorff There's a merge conflict (most likely in the release notes), do you mind rebasing? @jreback perhaps we could put like fifty blank lines in each subsection of the release notes and let people insert their's in randomly (to minimise merge conflicts early on in the release cycle) ? |
@hayd good idea! |
@jreback done 8633e6f (I bet this'll cause at lease 3 merge conflicts). Is the issue that people appends there release note at the end rather than insert it somewhere randomly? Hmmm, we'll see of this helps at all. @bquistorff pandas git tip: insert release notes somewhere randomly rather than append at the end! :) |
@bquistorff thanks! |
Opening a Stata dta file with no observations (but having variables) resulted in an error. Example file: https://dl.dropboxusercontent.com/u/6705315/no_obs_v115.dta.
The PR fixes this issue in stata.py, though maybe the issue should be fixed in DataFrame.