10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98bf6ec commit 9f08564Copy full SHA for 9f08564
pandas/tests/series/test_period.py
@@ -164,3 +164,12 @@ def test_end_time_timevalues(self, input_vals):
164
result = s.dt.end_time
165
expected = s.apply(lambda x: x.end_time)
166
tm.assert_series_equal(result, expected)
167
+
168
+ @pytest.mark.parametrize('input_vals', [
169
+ ('2001'), ('NaT')
170
+ ])
171
+ def test_to_period(self, input_vals):
172
+ # GH 21205
173
+ expected = Series([input_vals], dtype='Period[D]')
174
+ result = Series([input_vals], dtype='datetime64[ns]').dt.to_period('D')
175
+ tm.assert_series_equal(result, expected)
0 commit comments