I have a pandas.DataFrame that contains numpy.nan floats. However, when using an Excel script, the fields in which floating numpy.nan should be are empty. I would expect at least a string representation instead of nothing.
Any thoughts on why this might be?
The writer code is as follows:
writer=pandas.ExcelWriter('output.xls') frame.to_excel(writer,'tab name') writer.save()
Where the frame looks something like this (pay attention to NaN on 2013-01-1):
Series ID Risk Bucket Contract PX Last Contract Value (Local) Currency X Contract Value (USD) Currency 2013-01-01 Future_ES EQ ES1 Index NaN NaN 1 NaN USD Curncy 2013-01-02 Future_ES EQ ES1 Index 1447.16 72362.5 1 72362.5 USD Curncy 2013-01-03 Future_ES EQ ES1 Index 1443.68 72187.5 1 72187.5 USD Curncy 2013-01-04 Future_ES EQ ES1 Index 1447.90 72400.0 1 72400.0 USD Curncy
But the Excel file has spaces (see attached image).

source share