>> pd.Serie...">

pd.NA na_rep truncated in to_csv · Issue #29975 · pandas-dev/pandas (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@WillAyd

Description

@WillAyd

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

@jorisvandenbossche