Skip to content

BUG: Fix GSO values when writing latin-1 strLs #24337

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 1 commit into from
Dec 18, 2018

Conversation

bashtage
Copy link
Contributor

The size calculation of the string is incorrect when writing characters
that have a different encoding in latin-1 and utf-8. The utf-8 size
needs to be written instead of the latin-1 size.

@pep8speaks
Copy link

Hello @bashtage! Thanks for submitting the PR.

The size calculation of the string is incorrect when writing characters
that have a different encoding in latin-1 and utf-8. The utf-8 size
needs to be written in stead of the latin-1 size.
@bashtage bashtage force-pushed the fix-stata-strl-size-latin1 branch from 2b5dc0a to 280f48b Compare December 18, 2018 13:03
@jreback jreback added Bug IO Stata read_stata, to_stata labels Dec 18, 2018
@jreback jreback added this to the 0.24.0 milestone Dec 18, 2018
@jreback
Copy link
Contributor

jreback commented Dec 18, 2018

lgtm. ping on green.

@codecov
Copy link

codecov bot commented Dec 18, 2018

Codecov Report

Merging #24337 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #24337   +/-   ##
=======================================
  Coverage   92.28%   92.28%           
=======================================
  Files         162      162           
  Lines       51833    51833           
=======================================
  Hits        47833    47833           
  Misses       4000     4000
Flag Coverage Δ
#multiple 90.68% <ø> (ø) ⬆️
#single 42.99% <ø> (-0.01%) ⬇️
Impacted Files Coverage Δ
pandas/core/indexes/period.py 93.06% <0%> (-0.04%) ⬇️
pandas/core/reshape/tile.py 94.82% <0%> (+0.06%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6c8aabc...280f48b. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Dec 18, 2018

Codecov Report

Merging #24337 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #24337   +/-   ##
=======================================
  Coverage   92.28%   92.28%           
=======================================
  Files         162      162           
  Lines       51833    51833           
=======================================
  Hits        47833    47833           
  Misses       4000     4000
Flag Coverage Δ
#multiple 90.68% <ø> (ø) ⬆️
#single 42.99% <ø> (-0.01%) ⬇️
Impacted Files Coverage Δ
pandas/core/indexes/period.py 93.06% <0%> (-0.04%) ⬇️
pandas/core/reshape/tile.py 94.82% <0%> (+0.06%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6c8aabc...280f48b. Read the comment docs.

@jreback jreback merged commit 2b5058e into pandas-dev:master Dec 18, 2018
@jreback
Copy link
Contributor

jreback commented Dec 18, 2018

thanks @bashtage

TomAugspurger pushed a commit to TomAugspurger/pandas that referenced this pull request Dec 20, 2018
The size calculation of the string is incorrect when writing characters
that have a different encoding in latin-1 and utf-8. The utf-8 size
needs to be written in stead of the latin-1 size.
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
The size calculation of the string is incorrect when writing characters
that have a different encoding in latin-1 and utf-8. The utf-8 size
needs to be written in stead of the latin-1 size.
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
The size calculation of the string is incorrect when writing characters
that have a different encoding in latin-1 and utf-8. The utf-8 size
needs to be written in stead of the latin-1 size.
@bashtage bashtage deleted the fix-stata-strl-size-latin1 branch March 21, 2019 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug IO Stata read_stata, to_stata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support writing unicode characters in df.to_stata()
3 participants