A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/13259 below:

DataFrame.to_csv(quoting=csv.QUOTE_NONNUMERIC) now also quotes numeric values · Issue #13259 · pandas-dev/pandas · GitHub

Somewhere between 0.16.1 and 0.18.1, QUOTE_NONNUMERIC started also quoting numeric values unexpectedly.

import csv
df = pandas.DataFrame({
        'c_string': ['a', 'b,c'],
        'c_int': [42, numpy.nan],
        'c_float': [1.0, 3.2],
        'c_bool': [True, False],
    })
print df.to_csv(quoting=csv.QUOTE_NONNUMERIC)

In 0.16.1, the output was:

"","c_bool","c_float","c_int","c_string"
0,True,1.0,42.0,"a"
1,False,3.2,"","b,c"

In 0.18.1, the output is:

"","c_bool","c_float","c_int","c_string"
0,True,"1.0","42.0","a"
1,False,"3.2","","b,c"

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4