pd.NA na_rep
truncated in to_csv · Issue #29975 · pandas-dev/pandas (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
Just found this while messing around with how the new pd.NA sentinel would work with extension modules
pd.Series(["a", pd.NA, "c"]).to_csv(na_rep="ZZZZZ") ',0\n0,a\n1,ZZZZZ\n2,c\n' pd.Series(["a", pd.NA, "c"], dtype="string").to_csv(na_rep="ZZZZZ") ',0\n0,a\n1,ZZ\n2,c\n'
Note the latter is truncated to two letters