-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: Unable to open Stata 118 or 119 format files saved in big-endian… #58640
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
BUG: Unable to open Stata 118 or 119 format files saved in big-endian… #58640
Conversation
… format that contain strL data
Just to check - are the dta files produced by Stata? |
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.
Small changes to clarify changed test. Otherwise LGTM. Only other question is to verify dta files are created by Stata.
pandas/tests/io/test_stata.py
Outdated
"stata16_be_119", | ||
], | ||
) | ||
def test_unicode_dta_118(self, file, datapath): |
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.
Maybe rename 118 -> 118_119
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.
Good idea - I have now renamed these functions.
pandas/tests/io/test_stata.py
Outdated
"stata14_be_119", | ||
], | ||
) | ||
def test_read_dta18(self, file, datapath): |
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.
Similar rename here would be clearer.
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.
I have now renamed this as suggested.
One more question: Does stata read all of the dta files correctly? |
These files were not created with Stata but were made using the published specification. I have however checked that they all load correctly into Stata and have used it to verify that they are constructed correctly:
|
Can you ping on green and I'll merge this in. |
Thanks @bashtage . All checks how how completed. |
Thanks for the fix. |
… format that contain strL data
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.