Skip to content

Respect byteorder in StataReader #12269

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
wants to merge 1 commit into from
Closed

Conversation

aplanas
Copy link

@aplanas aplanas commented Feb 9, 2016

Partially fix #11282 for s390x

@jreback
Copy link
Contributor

jreback commented Feb 9, 2016

would love to include, but can you include a test. ideally write a test frame in (both little/big) endian then read back.

@jreback jreback added Testing pandas testing functions or related to the test suite IO Stata read_stata, to_stata Compat pandas objects compatability with Numpy or Python functions labels Feb 9, 2016
@aplanas
Copy link
Author

aplanas commented Feb 9, 2016

Actually I detected that because of this test:

nosetests -s pandas/io/tests/test_stata.py:TestStata.test_read_dta18

This test was OK in x86_64 and wrong on ARM and S390X machines, now is green in both.

@jreback
Copy link
Contributor

jreback commented Feb 9, 2016

don't delete tests
better to skip that on platforms where it is inappropriate (and use a different one where it is)

so ideally have a file in a different byte order then test it can be read in the correct platform (and errors on incorrect platforms)

@kshedden
Copy link
Contributor

kshedden commented Feb 9, 2016

Does anyone have access to Stata on a BE machine? If so we should just convert a few of the test files to BE and then test that we can read them back in on a LE machine.

I don't have access to a BE machine with Stata, but I can provide Stata code to load/save the files. If run on a BE machine that should convert the file byteorder to BE. I don't think Stata will save files in non-native byte order, so I can't do this on any of my machines.

@jreback
Copy link
Contributor

jreback commented Mar 12, 2016

closing, but pls reopen if you can add tests

@jreback jreback closed this Mar 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions IO Stata read_stata, to_stata Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

few fresh failed tests on big-endian platforms (0.17.0+git8-gcac4ad2)
3 participants