Closed
Description
https://travis-ci.org/pandas-dev/pandas/jobs/424485100 isn't master, but it's seeminglyon other PRs. e.g. https://travis-ci.org/pandas-dev/pandas/jobs/424480841#L2253
______________ TestExcelWriter.test_tsframe[openpyxl-.xlsx-True] _______________
[gw0] darwin -- Python 3.5.6 /Users/travis/miniconda3/envs/pandas/bin/python
self = <pandas.tests.io.test_excel.TestExcelWriter object at 0x1148ad9b0>
merge_cells = True, engine = 'openpyxl', ext = '.xlsx'
def test_tsframe(self, merge_cells, engine, ext):
df = tm.makeTimeDataFrame()[:5]
> df.to_excel(self.path, 'test1')
pandas/tests/io/test_excel.py:1153:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pandas/core/frame.py:1749: in to_excel
engine=engine)
pandas/io/formats/excel.py:658: in write
freeze_panes=freeze_panes)
pandas/io/excel.py:1419: in write_cells
xcell.value, fmt = self._value_with_fmt(cell.val)
../../../miniconda3/envs/pandas/lib/python3.5/site-packages/openpyxl/cell/cell.py:291: in value
self._bind_value(value)
../../../miniconda3/envs/pandas/lib/python3.5/site-packages/openpyxl/cell/cell.py:193: in _bind_value
self._set_time_format(value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Cell 'test1'.A2>, value = Timestamp('2000-01-03 00:00:00', freq='B')
def _set_time_format(self, value):
"""Set number format for Python date or time"""
fmts = {
datetime.datetime:numbers.FORMAT_DATE_DATETIME,
datetime.date:numbers.FORMAT_DATE_YYYYMMDD2,
datetime.time:numbers.FORMAT_DATE_TIME6,
datetime.timedelta:numbers.FORMAT_DATE_TIMEDELTA,
}
> self.number_format = fmts[type(value)]
E KeyError: <class 'pandas._libs.tslibs.timestamps.Timestamp'>
Trying to reproduce locally now.