We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1237f20 commit 6a6faf5Copy full SHA for 6a6faf5
pandas/tests/indexing/test_partial.py
@@ -650,3 +650,13 @@ def test_loc_with_list_of_strings_representing_datetimes_not_matched_type(
650
s[labels]
651
with pytest.raises(KeyError, match=msg):
652
df.loc[labels]
653
+
654
+ def test_indexing_timeseries_regression(self):
655
+ # Issue 34860
656
+ arr = date_range("1/1/2008", "1/1/2009")
657
+ result = arr.to_series()["2008"]
658
659
+ rng = date_range(start="2008-01-01", end="2008-12-31")
660
+ expected = Series(rng, index=rng)
661
662
+ tm.assert_series_equal(result, expected)
0 commit comments