Skip to content

Commit 4d61410

Browse files
code sample for pandas-dev#36953
1 parent c68f5fb commit 4d61410

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

bisect/36953.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import numpy as np
2+
import pandas as pd
3+
4+
print(pd.__version__)
5+
6+
increment = pd.Series(pd.to_timedelta(30 + np.random.randn(1000), unit="s")).cumsum()
7+
increment[-1] = None
8+
index = pd.Timestamp("2012-01-01 09:00") + increment
9+
df = pd.Series(range(len(index)), index=index).to_frame()
10+
print(df)
11+
12+
res = df["2012-01-01":"2012-01-05"]
13+
print(res)

0 commit comments

Comments
 (0)