Skip to content

Commit 656ec44

Browse files
Fix detection to raise warning
1 parent b1c7f87 commit 656ec44

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pandas/io/excel.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ def _parse_excel(self, sheetname=0, header=0, skiprows=None, names=None,
336336
raise NotImplementedError("chunksize keyword of read_excel "
337337
"is not implemented")
338338

339-
if parse_dates and not index_col:
339+
if parse_dates is True and not index_col:
340340
warn("The 'parse_dates=True' keyword of read_excel was provided"
341341
" without an 'index_col' keyword value.")
342342

pandas/io/tests/test_excel.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -889,8 +889,9 @@ def test_read_excel_chunksize(self):
889889
def test_read_excel_parse_dates(self):
890890
# GH 11544, 12051
891891

892-
df = DataFrame({'col': [1, 2, 3],
893-
'date_strings': pd.date_range('2012-01-01', periods=3)})
892+
df = DataFrame(
893+
{'col': [1, 2, 3],
894+
'date_strings': pd.date_range('2012-01-01', periods=3)})
894895
df2 = df.copy()
895896
df2['date_strings'] = df2['date_strings'].dt.strftime('%m/%d/%Y')
896897

0 commit comments

Comments
 (0)