Skip to content

Fix #25099 set na_rep values before converting to string to prevent data truncation #25103

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 2 commits into from
Sep 10, 2019

Conversation

kinow
Copy link
Contributor

@kinow kinow commented Feb 3, 2019

Hi,

The code in this pull request fixes #25099, and all tests pass. However, I am not sure if this is the best (or even an elegant) solution.

The issue happened because the float NaN is converted to str (i.e. "nan"), which gets stored as a <U3. When the user-provided na_rep is used, it is first truncated down to the data type length (i.e. "myn").

I tried moving the na_rep to before it is converted to string, but other tests fail. I could not find other code using a similar approach, of concatenating <U with the desired length. So I assume it's an easy hack, but not a proper solution?

Any suggestions? I also tried setting the na_rep value only in the if branch that calls values.astype(str), but there are still test failures.

Cheers
Bruno

@codecov
Copy link

codecov bot commented Feb 3, 2019

Codecov Report

Merging #25103 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #25103      +/-   ##
==========================================
+ Coverage   92.37%   92.37%   +<.01%     
==========================================
  Files         166      166              
  Lines       52415    52417       +2     
==========================================
+ Hits        48418    48420       +2     
  Misses       3997     3997
Flag Coverage Δ
#multiple 90.79% <100%> (ø) ⬆️
#single 42.87% <66.66%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/internals/blocks.py 94.18% <100%> (ø) ⬆️

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 f75a220...f393d18. Read the comment docs.

@codecov
Copy link

codecov bot commented Feb 3, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@e0c63b4). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #25103   +/-   ##
=========================================
  Coverage          ?   40.71%           
=========================================
  Files             ?      175           
  Lines             ?    52378           
  Branches          ?        0           
=========================================
  Hits              ?    21328           
  Misses            ?    31050           
  Partials          ?        0
Flag Coverage Δ
#single 40.71% <100%> (?)
Impacted Files Coverage Δ
pandas/core/internals/blocks.py 51.2% <100%> (ø)

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 e0c63b4...10f67ab. Read the comment docs.

@jreback jreback added the Output-Formatting __repr__ of pandas objects, to_string label Feb 3, 2019
@kinow kinow force-pushed the fix-issue-gh25099-csv-narep branch from f393d18 to 388cd59 Compare February 3, 2019 21:34
@pep8speaks
Copy link

pep8speaks commented Feb 3, 2019

Hello @kinow! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2019-09-10 00:01:49 UTC

@kinow kinow force-pushed the fix-issue-gh25099-csv-narep branch 3 times, most recently from 5245859 to f6c09b1 Compare February 4, 2019 08:52
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls run the asv's for csv and pytables as well and report if any regressions

@kinow
Copy link
Contributor Author

kinow commented Feb 5, 2019

@jreback just finished running asv with the following command

asv continuous -f 1.1 upstream/master HEAD -b ^io.csv

Complete output in this gist, but near the bottom of its output, it says

+      9.92±0.1ms       11.7±0.6ms     1.18  io.csv.ReadCSVFloatPrecision.time_read_csv_python_engine(',', '_', None)
+         119±1ms          135±4ms     1.14  io.csv.ReadCSVCategorical.time_convert_direct
+         171±5ms          190±4ms     1.11  io.csv.ReadCSVCategorical.time_convert_post

SOME BENCHMARKS HAVE CHANGED SIGNIFICANTLY.

Which doesn't look good I think... do you reckon I should try to find another alternative, perhaps duplicating code and leaving the previous method unaltered?

By the way, I didn't find a pytables.py under the benchmarks folder. Is there another way to trigger benchmarking tests for pytest in Pandas?

Thanks
Bruno

@jreback
Copy link
Contributor

jreback commented Mar 20, 2019

can you merge master

@kinow kinow force-pushed the fix-issue-gh25099-csv-narep branch from 04d8752 to 0f93786 Compare March 20, 2019 02:11
@kinow
Copy link
Contributor Author

kinow commented Mar 20, 2019

Branch rebased onto master

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a whatsnew note in bug fixes, I/O section. ping on green.

@kinow kinow force-pushed the fix-issue-gh25099-csv-narep branch from 0f93786 to 6e0dd9c Compare March 20, 2019 09:55
@kinow
Copy link
Contributor Author

kinow commented Mar 20, 2019

@jreback added a whatsnew entry as requested - happy to amend if text is incorrect or too simple.

I resolved the outdated discussions, except for one that is still pertinent. The initial approach was to calculate the maximum length when it was a string, and then just create a type of that length. That way the masked values were not truncated.

The pending discussion is around that approach, where we tried instead to change the order of where the mask gets applied. But several other tests failed after that (see my last comment that Travis failed). In one test that I found, it had an empty string, and for some reason with the different order, it was trying to call int('') and returning ValueError: invalid literal for int() with base 10: ''.

So I reverted that change, and Travis stopped complaining. Also ran asv:

$ asv continuous -f 1.1 upstream/master HEAD -b ^io.csv
· No information stored about machine 'ranma'. I know about nothing.
  

I will now ask you some questions about this machine to identify it in the benchmarks.

1. machine:  A unique name to identify this machine in the results.
   May be anything, as long as it is unique across all the machines
   used to benchmark this project.  NOTE: If changed from the default,
   it will no longer match the hostname of this machine, and you may
   need to explicitly use the --machine argument to asv.
machine [ranma]: 
2. os:  The OS type and version of this machine.  For example,
   'Macintosh OS-X 10.8'.
os [Linux 4.15.0-46-generic]: 
3. arch:  The generic CPU architecture of this machine.  For example,
   'i386' or 'x86_64'.
arch [x86_64]: 
4. cpu:  A specific description of the CPU of this machine, including
   its speed and class.  For example, 'Intel(R) Core(TM) i5-2520M CPU
   @ 2.50GHz (4 cores)'.
cpu [Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz]: 
5. ram:  The amount of physical RAM on this machine.  For example,
   '4GB'.
ram [16119292]: 
· Creating environments......................................................................................................................................................................................................
· Discovering benchmarks
·· Uninstalling from conda-py3.6-Cython-matplotlib-numexpr-numpy-openpyxl-pytables-pytest-scipy-sqlalchemy-xlrd-xlsxwriter-xlwt
·· Building 6e0dd9cf <fix-issue-gh25099-csv-narep> for conda-py3.6-Cython-matplotlib-numexpr-numpy-openpyxl-pytables-pytest-scipy-sqlalchemy-xlrd-xlsxwriter-xlwt.........................................................
·· Installing 6e0dd9cf <fix-issue-gh25099-csv-narep> into conda-py3.6-Cython-matplotlib-numexpr-numpy-openpyxl-pytables-pytest-scipy-sqlalchemy-xlrd-xlsxwriter-xlwt..
· Running 32 total benchmarks (2 commits * 1 environments * 16 benchmarks)
[  0.00%] · For pandas commit 46639512 <master> (round 1/2):
[  0.00%] ·· Building for conda-py3.6-Cython-matplotlib-numexpr-numpy-openpyxl-pytables-pytest-scipy-sqlalchemy-xlrd-xlsxwriter-xlwt............................................................
[  0.00%] ·· Benchmarking conda-py3.6-Cython-matplotlib-numexpr-numpy-openpyxl-pytables-pytest-scipy-sqlalchemy-xlrd-xlsxwriter-xlwt
[  1.56%] ··· Running (io.csv.ReadCSVCategorical.time_convert_direct--)...............
[ 25.00%] · For pandas commit 6e0dd9cf <fix-issue-gh25099-csv-narep> (round 1/2):
[ 25.00%] ·· Building for conda-py3.6-Cython-matplotlib-numexpr-numpy-openpyxl-pytables-pytest-scipy-sqlalchemy-xlrd-xlsxwriter-xlwt...
[ 25.00%] ·· Benchmarking conda-py3.6-Cython-matplotlib-numexpr-numpy-openpyxl-pytables-pytest-scipy-sqlalchemy-xlrd-xlsxwriter-xlwt
[ 26.56%] ··· Running (io.csv.ReadCSVCategorical.time_convert_direct--)...............
[ 50.00%] · For pandas commit 6e0dd9cf <fix-issue-gh25099-csv-narep> (round 2/2):
[ 50.00%] ·· Benchmarking conda-py3.6-Cython-matplotlib-numexpr-numpy-openpyxl-pytables-pytest-scipy-sqlalchemy-xlrd-xlsxwriter-xlwt
[ 51.56%] ··· io.csv.ReadCSVCategorical.time_convert_direct                                                                                                          56.9±0.6ms
[ 53.12%] ··· io.csv.ReadCSVCategorical.time_convert_post                                                                                                            82.8±0.5ms
[ 54.69%] ··· io.csv.ReadCSVComment.time_comment                                                                                                                     38.6±0.6ms
[ 56.25%] ··· io.csv.ReadCSVDInferDatetimeFormat.time_read_csv                                                                                                               ok
[ 56.25%] ··· ======================= ============= ============= =============
              --                                        format                 
              ----------------------- -----------------------------------------
               infer_datetime_format      custom       iso8601         ymd     
              ======================= ============= ============= =============
                        True           8.42±0.02ms   2.87±0.03ms   2.89±0.01ms 
                       False             138±1ms     2.41±0.01ms   2.27±0.01ms 
              ======================= ============= ============= =============

[ 57.81%] ··· io.csv.ReadCSVFloatPrecision.time_read_csv                                                                                                                     ok
[ 57.81%] ··· ===== ============= ============= ================ ============= ============= ================
              --                                    decimal / float_precision                                
              ----- -----------------------------------------------------------------------------------------
               sep     . / None      . / high    . / round_trip     _ / None      _ / high    _ / round_trip 
              ===== ============= ============= ================ ============= ============= ================
                ,    2.31±0.02ms   2.21±0.04ms    2.95±0.03ms     2.56±0.03ms   2.56±0.02ms    2.56±0.03ms   
                ;    2.33±0.02ms   2.24±0.05ms    2.96±0.04ms     2.53±0.03ms   2.49±0.04ms    2.53±0.03ms   
              ===== ============= ============= ================ ============= ============= ================

[ 59.38%] ··· io.csv.ReadCSVFloatPrecision.time_read_csv_python_engine                                                                                                       ok
[ 59.38%] ··· ===== ============ ============ ================ ============= ============= ================
              --                                   decimal / float_precision                               
              ----- ---------------------------------------------------------------------------------------
               sep    . / None     . / high    . / round_trip     _ / None      _ / high    _ / round_trip 
              ===== ============ ============ ================ ============= ============= ================
                ,    4.66±0.2ms   4.63±0.1ms     4.70±0.1ms     3.90±0.05ms   3.90±0.03ms    3.89±0.05ms   
                ;    4.64±0.2ms   4.62±0.1ms     4.62±0.2ms     3.88±0.02ms   3.89±0.05ms    3.90±0.04ms   
              ===== ============ ============ ================ ============= ============= ================

[ 60.94%] ··· io.csv.ReadCSVMemoryGrowth.mem_parser_chunks                                                                                                                    0
[ 62.50%] ··· io.csv.ReadCSVParseDates.time_baseline                                                                                                                2.71±0.05ms
[ 64.06%] ··· io.csv.ReadCSVParseDates.time_multiple_date                                                                                                           3.13±0.01ms
[ 65.62%] ··· io.csv.ReadCSVSkipRows.time_skipprows                                                                                                                          ok
[ 65.62%] ··· ========== ============
               skiprows              
              ---------- ------------
                 None     23.0±0.2ms 
                10000     15.1±0.3ms 
              ========== ============

[ 67.19%] ··· io.csv.ReadCSVThousands.time_thousands                                                                                                                         ok
[ 67.19%] ··· ===== ============ ============
              --            thousands        
              ----- -------------------------
               sep      None          ,      
              ===== ============ ============
                ,    18.6±0.2ms   19.5±0.5ms 
                |    18.6±0.3ms   20.7±0.2ms 
              ===== ============ ============

[ 68.75%] ··· io.csv.ReadUint64Integers.time_read_uint64                                                                                                             4.79±0.1ms
[ 70.31%] ··· io.csv.ReadUint64Integers.time_read_uint64_na_values                                                                                                  7.47±0.07ms
[ 71.88%] ··· io.csv.ReadUint64Integers.time_read_uint64_neg_values                                                                                                 7.32±0.09ms
[ 73.44%] ··· io.csv.ToCSV.time_frame                                                                                                                                        ok
[ 73.44%] ··· ======= ============
                kind              
              ------- ------------
                wide   133±0.8ms  
                long    237±1ms   
               mixed   29.8±0.6ms 
              ======= ============

[ 75.00%] ··· io.csv.ToCSVDatetime.time_frame_date_formatting                                                                                                        25.5±0.2ms
[ 75.00%] · For pandas commit 46639512 <master> (round 2/2):
[ 75.00%] ·· Building for conda-py3.6-Cython-matplotlib-numexpr-numpy-openpyxl-pytables-pytest-scipy-sqlalchemy-xlrd-xlsxwriter-xlwt...
[ 75.00%] ·· Benchmarking conda-py3.6-Cython-matplotlib-numexpr-numpy-openpyxl-pytables-pytest-scipy-sqlalchemy-xlrd-xlsxwriter-xlwt
[ 76.56%] ··· io.csv.ReadCSVCategorical.time_convert_direct                                                                                                          53.8±0.3ms
[ 78.12%] ··· io.csv.ReadCSVCategorical.time_convert_post                                                                                                            80.2±0.5ms
[ 79.69%] ··· io.csv.ReadCSVComment.time_comment                                                                                                                     39.6±0.7ms
[ 81.25%] ··· io.csv.ReadCSVDInferDatetimeFormat.time_read_csv                                                                                                               ok
[ 81.25%] ··· ======================= ============= ============= =============
              --                                        format                 
              ----------------------- -----------------------------------------
               infer_datetime_format      custom       iso8601         ymd     
              ======================= ============= ============= =============
                        True           8.48±0.06ms   2.89±0.02ms   2.87±0.03ms 
                       False            140±0.3ms    2.42±0.01ms   2.31±0.01ms 
              ======================= ============= ============= =============

[ 82.81%] ··· io.csv.ReadCSVFloatPrecision.time_read_csv                                                                                                                     ok
[ 82.81%] ··· ===== ============= ============= ================ ============= ============= ================
              --                                    decimal / float_precision                                
              ----- -----------------------------------------------------------------------------------------
               sep     . / None      . / high    . / round_trip     _ / None      _ / high    _ / round_trip 
              ===== ============= ============= ================ ============= ============= ================
                ,    2.31±0.04ms   2.22±0.03ms    3.00±0.04ms     2.58±0.04ms   2.58±0.04ms    2.63±0.05ms   
                ;    2.32±0.05ms   2.21±0.04ms    3.00±0.04ms     2.62±0.04ms   2.63±0.03ms    2.59±0.04ms   
              ===== ============= ============= ================ ============= ============= ================

[ 84.38%] ··· io.csv.ReadCSVFloatPrecision.time_read_csv_python_engine                                                                                                       ok
[ 84.38%] ··· ===== ============ ============ ================ ============ ============ ================
              --                                  decimal / float_precision                              
              ----- -------------------------------------------------------------------------------------
               sep    . / None     . / high    . / round_trip    _ / None     _ / high    _ / round_trip 
              ===== ============ ============ ================ ============ ============ ================
                ,    5.10±0.6ms   5.07±0.6ms     5.06±0.5ms     4.43±0.5ms   4.36±0.5ms     4.48±0.6ms   
                ;    5.07±0.6ms   5.05±0.5ms     5.09±0.5ms     4.41±0.5ms   4.36±0.5ms     4.41±0.6ms   
              ===== ============ ============ ================ ============ ============ ================

[ 85.94%] ··· io.csv.ReadCSVMemoryGrowth.mem_parser_chunks                                                                                                                    0
[ 87.50%] ··· io.csv.ReadCSVParseDates.time_baseline                                                                                                                2.72±0.05ms
[ 89.06%] ··· io.csv.ReadCSVParseDates.time_multiple_date                                                                                                           3.13±0.02ms
[ 90.62%] ··· io.csv.ReadCSVSkipRows.time_skipprows                                                                                                                          ok
[ 90.62%] ··· ========== ============
               skiprows              
              ---------- ------------
                 None     22.9±0.3ms 
                10000     15.0±0.1ms 
              ========== ============

[ 92.19%] ··· io.csv.ReadCSVThousands.time_thousands                                                                                                                         ok
[ 92.19%] ··· ===== ============ ============
              --            thousands        
              ----- -------------------------
               sep      None          ,      
              ===== ============ ============
                ,    18.9±0.2ms   19.6±0.2ms 
                |    19.1±0.2ms   20.6±0.1ms 
              ===== ============ ============

[ 93.75%] ··· io.csv.ReadUint64Integers.time_read_uint64                                                                                                            4.75±0.06ms
[ 95.31%] ··· io.csv.ReadUint64Integers.time_read_uint64_na_values                                                                                                  7.38±0.08ms
[ 96.88%] ··· io.csv.ReadUint64Integers.time_read_uint64_neg_values                                                                                                  7.32±0.1ms
[ 98.44%] ··· io.csv.ToCSV.time_frame                                                                                                                                        ok
[ 98.44%] ··· ======= ============
                kind              
              ------- ------------
                wide   130±0.4ms  
                long    234±5ms   
               mixed   28.9±0.4ms 
              ======= ============

[100.00%] ··· io.csv.ToCSVDatetime.time_frame_date_formatting                                                                                                        25.7±0.5ms

BENCHMARKS NOT SIGNIFICANTLY CHANGED.

However, I am still not too confident if that is a valid approach, as I did not find other parts of the code in Pandas where types had a dynamic size 😕

I hope that makes sense.

@jreback jreback added this to the 0.25.0 milestone Mar 20, 2019
@jreback jreback added the Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate label Mar 20, 2019
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping on green.

@kinow kinow force-pushed the fix-issue-gh25099-csv-narep branch from 6e0dd9c to 83a6b14 Compare March 20, 2019 20:35
Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you merge master?

@kinow kinow force-pushed the fix-issue-gh25099-csv-narep branch from 83a6b14 to a56b837 Compare April 10, 2019 11:02
@kinow
Copy link
Contributor Author

kinow commented Apr 10, 2019

Thanks for the review @WillAyd

Can you merge master?

Done. Rebased, fixed conflicts, and tried to address the feedback, except the parameterized test as that was requested before (I think the intention was to add more test scenarios).

Cheers
Bruno

@kinow kinow force-pushed the fix-issue-gh25099-csv-narep branch from a56b837 to 3dcb453 Compare April 11, 2019 04:45
@jreback jreback removed this from the 0.25.0 milestone Apr 20, 2019
@jreback
Copy link
Contributor

jreback commented Apr 20, 2019

can you merge master

@kinow kinow force-pushed the fix-issue-gh25099-csv-narep branch from 3dcb453 to 1fdb74a Compare April 21, 2019 12:30
@simonjayhawkins
Copy link
Member

@kinow can you merge master.

Conflicting files
doc/source/whatsnew/v0.25.0.rst
pandas/core/internals/blocks.py

@kinow
Copy link
Contributor Author

kinow commented Jun 1, 2019

Done @simonjayhawkins 👍

@kinow kinow force-pushed the fix-issue-gh25099-csv-narep branch from 1fdb74a to 6330776 Compare June 1, 2019 09:26
@jreback
Copy link
Contributor

jreback commented Jun 27, 2019

this looked reasonble, can you merge master

@kinow kinow force-pushed the fix-issue-gh25099-csv-narep branch 2 times, most recently from 54c3697 to 549363e Compare July 10, 2019 03:00
@kinow
Copy link
Contributor Author

kinow commented Jul 10, 2019

Done @jreback 👍

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this went for a bit without review - @kinow any chance this is still active?

@kinow
Copy link
Contributor Author

kinow commented Sep 5, 2019

Hi @WillAyd

Looks like this went for a bit without review - @kinow any chance this is still active?

Sure thing, will just need to re-read last comments and rebase the code. Thanks for the review, I will try to update it today or over the weekend 👍

@kinow kinow force-pushed the fix-issue-gh25099-csv-narep branch from 549363e to 53e0ae9 Compare September 6, 2019 02:34
@kinow
Copy link
Contributor Author

kinow commented Sep 6, 2019

Rebased, now will try to find some time this weekend to troubleshoot the Travis errors, and see if I can fix them and them look at PyUnicode_GET_LENGTH too.

@kinow kinow force-pushed the fix-issue-gh25099-csv-narep branch 2 times, most recently from 7fd549d to 0b0bb76 Compare September 6, 2019 08:23
@kinow kinow force-pushed the fix-issue-gh25099-csv-narep branch 3 times, most recently from ec87b6e to 391c3b4 Compare September 9, 2019 22:43
@kinow kinow force-pushed the fix-issue-gh25099-csv-narep branch from 391c3b4 to 7d94d1f Compare September 9, 2019 22:49
@kinow
Copy link
Contributor Author

kinow commented Sep 9, 2019

@WillAyd rebased, fixed conflicts, tried to address your feedback the best I could, and squashed commits too. CI passing, so should be ready for review again 👍 thanks

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just need to move the whatsnew but I think this is reasonable. Back to @jreback

@@ -64,7 +64,7 @@ I/O

- Fix regression in notebook display where <th> tags not used for :attr:`DataFrame.index` (:issue:`28204`).
- Regression in :meth:`~DataFrame.to_csv` where writing a :class:`Series` or :class:`DataFrame` indexed by an :class:`IntervalIndex` would incorrectly raise a ``TypeError`` (:issue:`28210`)
-
- Bug in :meth:`DataFrame.to_csv` where values were truncated when the length of ``na_rep`` was shorter than the text input data. (:issue:`25099`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move this to v1.0.0 at this point?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, done. Moved to v1.0.0 under IO too. Removed the changes to v0.25.2, and edited last commit. Thanks @WillAyd

@kinow kinow force-pushed the fix-issue-gh25099-csv-narep branch from 7d94d1f to 10f67ab Compare September 10, 2019 00:01
Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. By the way @kinow no need to squash your commits we do so before merge

@kinow
Copy link
Contributor Author

kinow commented Sep 10, 2019

lgtm. By the way @kinow no need to squash your commits we do so before merge

Oh, thanks for the heads-up, I thought I would be asked to squash them later. And I realized I had made a mess in the last commits, so decided to tidy it up a bit. Lesson learned for the next PR. Thanks!

@TomAugspurger TomAugspurger added this to the 1.0 milestone Sep 10, 2019
@TomAugspurger
Copy link
Contributor

Looks like we have a couple +1s. Thanks @kinow!

@TomAugspurger TomAugspurger merged commit 0c0a0cf into pandas-dev:master Sep 10, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
…uncation (pandas-dev#25103)

* Fix pandas-dev#25099 set na_rep values before converting to string to prevent data truncation
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
…uncation (pandas-dev#25103)

* Fix pandas-dev#25099 set na_rep values before converting to string to prevent data truncation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug ExtensionArray Extending pandas with custom dtypes or arrays. IO CSV read_csv, to_csv Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Output-Formatting __repr__ of pandas objects, to_string
Projects
None yet
Development

Successfully merging this pull request may close these issues.

na_rep Truncated With Int64 dtype in to_csv
6 participants