You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import pandas as pd
import numpy as np
dates = pd.date_range('20130101',periods=6)
df = pd.DataFrame(np.random.randn(6,4),index = dates, columns=list('ABCD'))
df.to_excel("foo.xlsx")
ERROR MESSAGE
Traceback (most recent call last):
File "test.py", line 5, in
df.to_excel("foo.xlsx")
File "/Library/Python/2.7/site-packages/pandas/core/frame.py", line 1204, in to_excel
startrow=startrow, startcol=startcol)
File "/Library/Python/2.7/site-packages/pandas/io/excel.py", line 530, in write_cells
style = self._convert_to_style(cell.style)
File "/Library/Python/2.7/site-packages/pandas/io/excel.py", line 577, in _convert_to_style
from openpyxl.style import Style
ImportError: No module named style
ANALYSIS
Went into my site packages --> openpyxl
Saw that the folder for style has been renamed to styles.
Did a reinstall of openpyxl with the same results.
Manually renamed to openpyxl.styles, but engendered more bugs (something about borders).
My hypothesis: openpyxl has changed their naming convention that broke the the Pandas.to_excel function.
The text was updated successfully, but these errors were encountered:
from pandas.util.print_versions import show_versions
show_versions()
INSTALLED VERSIONS
commit: None
python: 2.7.5.final.0
python-bits: 64
OS: Darwin
OS-release: 13.1.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.13.1
Cython: None
numpy: 1.6.2
scipy: 0.11.0
statsmodels: None
IPython: 2.0.0
sphinx: None
patsy: None
scikits.timeseries: None
dateutil: 1.5
pytz: 2012d
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.1.1
openpyxl: 2.0.2
xlrd: 0.9.2
xlwt: 0.7.5
xlsxwriter: None
sqlalchemy: 0.9.4
lxml: None
bs4: None
html5lib: None
bq: None
apiclient: None
THE CODE
import pandas as pd
import numpy as np
dates = pd.date_range('20130101',periods=6)
df = pd.DataFrame(np.random.randn(6,4),index = dates, columns=list('ABCD'))
df.to_excel("foo.xlsx")
ERROR MESSAGE
Traceback (most recent call last):
File "test.py", line 5, in
df.to_excel("foo.xlsx")
File "/Library/Python/2.7/site-packages/pandas/core/frame.py", line 1204, in to_excel
startrow=startrow, startcol=startcol)
File "/Library/Python/2.7/site-packages/pandas/io/excel.py", line 530, in write_cells
style = self._convert_to_style(cell.style)
File "/Library/Python/2.7/site-packages/pandas/io/excel.py", line 577, in _convert_to_style
from openpyxl.style import Style
ImportError: No module named style
ANALYSIS
Went into my site packages --> openpyxl
Saw that the folder for style has been renamed to styles.
Did a reinstall of openpyxl with the same results.
Manually renamed to openpyxl.styles, but engendered more bugs (something about borders).
My hypothesis: openpyxl has changed their naming convention that broke the the Pandas.to_excel function.
The text was updated successfully, but these errors were encountered: