Closed
Description
Hello,
to_excel
method with engine='xlwt'
doesn't support pandas.tslib.Timedelta
import numpy as np
import pandas as pd
idx = pd.date_range('20140101', '20140201')
df = pd.DataFrame(index=idx)
df['col0'] = np.random.randn(len(idx))
s_idx = pd.Series(idx, index=idx)
diff_idx = (s_idx-s_idx.shift(1)).fillna(pd.Timedelta(0))
df['diff_dt'] = diff_idx
df.to_excel("out.xls", engine='xlwt')
it works fine with xlsx files (engine openpyxl
or xlsxwriter
).
Kind regards