Skip to content

Commit 4dc5a3a

Browse files
This avoids failure to_datetime when value passed is None. This fix is for pandas versions > 0.24
closes pandas-dev#30011
2 parents de77f02 + 362d6e5 commit 4dc5a3a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pandas/tests/indexes/datetimes/test_tools.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,12 @@ def test_to_datetime_format_YYYYMMDD(self, cache):
110110
Series([19801222, None, 20010112])
111111
],
112112
)
113-
def test_to_datetime_format_YYYYMMDD_with_none(self,input_s):
113+
def test_to_datetime_format_YYYYMMDD_with_none(self, input_s):
114114
# GH 30011
115115
# format='%Y%m%d'
116116
# with None
117-
expected = Series([Timestamp("19801222"), Timestamp(None), Timestamp("20010112")])
117+
expected = Series([Timestamp("19801222"), Timestamp(None),
118+
Timestamp("20010112")])
118119
result = pd.to_datetime(input_s, format="%Y%m%d")
119120
tm.assert_series_equal(result, expected)
120121

0 commit comments

Comments
 (0)