Skip to content

BUG: byteorder option in to_stata is not honoured when writing strL data #58970

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

Merged
merged 3 commits into from
Jun 10, 2024

Conversation

cmjcharlton
Copy link
Contributor

I have created a local variable to indicate whether the file is being saved to the native byteorder in two places, but am happy to calculate this once in __init__ and store in self for later access if you prefer.

@mroeschke
Copy link
Member

but am happy to calculate this once in init and store in self for later access if you prefer.

I think this would be preferable. Over time we've wanted to avoid mutating state variables in methods if possible

@mroeschke mroeschke added the IO Stata read_stata, to_stata label Jun 10, 2024
@cmjcharlton
Copy link
Contributor Author

but am happy to calculate this once in init and store in self for later access if you prefer.

I think this would be preferable. Over time we've wanted to avoid mutating state variables in methods if possible

Thanks, that's useful to know. I have now changed this.

@mroeschke mroeschke added this to the 3.0 milestone Jun 10, 2024
@mroeschke mroeschke merged commit 629ffeb into pandas-dev:main Jun 10, 2024
47 checks passed
@mroeschke
Copy link
Member

Thanks @cmjcharlton

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO Stata read_stata, to_stata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Invalid Stata file is generated if byteorder='big' is specified and strings are saved as strL type
2 participants