na_rep Truncated With Int64 dtype in to_csv · Issue #25099 · pandas-dev/pandas (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
Code Sample
df = pd.DataFrame({"c": [float('nan')]*3}) df = df.astype("Int64")
print(df.to_csv(index=False, na_rep='mynull')) c myn myn myn
Problem description
I'd expect na_rep
to be always respected, with all column types.
Expected Output
print(df.to_csv(index=False, na_rep='mynull')) c mynull mynull mynull
Output of pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.6.4.final.0
python-bits: 32
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: pt_BR.cp1252
pandas: 0.24.0
pytest: None
pip: 9.0.1
setuptools: 28.8.0
Cython: None
numpy: 1.16.1
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 6.2.1
sphinx: None
patsy: None
dateutil: 2.7.5
pytz: 2018.9
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.2.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: 1.0.1
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None