News

New paper!

Thursday, December 21, 2017

Pandas: Save DataFrame with nan



Wondering why NaN is not saved by pd.to_csv??
Without the keyword na_rep, NaN (np.nan) will not be saved.
df.to_csv('netAnalysis_sd5n_new.txt',sep=' ',na_rep='nan')