Skip to content

Commit bfc2265

Browse files
code sample for pandas-dev#46671
1 parent 277a81a commit bfc2265

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

bisect/46671.py

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# BUG: NotImplementedError: Prefix not defined when slicing offset with loc #46671
2+
3+
import numpy as np
4+
import pandas as pd
5+
6+
print(pd.__version__)
7+
8+
d = pd.DataFrame(np.random.rand(10, 1))
9+
d.set_index(pd.date_range("01-01-2022", periods=10), inplace=True)
10+
d = d.asfreq(pd.DateOffset(days=1))
11+
result = d.loc["2022-01-01":"2022-01-03"]
12+
print(result)

0 commit comments

Comments
 (0)