Open mhooreman opened 7 years ago
xref #11355
This happens because pandas writes data column-by-column, where xlsxwriter
needs the data row-by-row to use constant_memory
. Fixing the above would fix this (a little complex, but PR welcome!) or we could also catch and raise a NotImplementedError
in the meantime.
Thanks Chris
import seaborn.apionly as sns
import pandas as pd
iris = sns.load_dataset('iris')
with pd.ExcelWriter('constant_memory_false.xlsx', engine='xlsxwriter',
options=dict(constant_memory=False)) as xlw:
iris.to_excel(xlw)
with pd.ExcelWriter('constant_memory_true.xlsx', engine='xlsxwriter',
options=dict(constant_memory=True)) as xlw:
iris.to_excel(xlw)
Traceback (most recent call last):
File "
What is needed to solve this? With pandas version v1 it does not throw an error but only reports the last row of the DF
Hi, any updates ?
I would still love this :)
Problem description
Hello,
When we export data frames to excel using
xlsxwriter
with the optionconstant_memory
set toTrue
, most of the cells are empty.Thanks a lot
Code Sample
Output of
pd.show_versions()