Skip to content

Commit 9f571c5

Browse files
code sample for pandas-dev#44978
1 parent abced04 commit 9f571c5

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

bisect/44978.py

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# BUG: shift with large periods creates mulfunctioning dtypes with master branch #44978
2+
3+
import numpy as np
4+
5+
import pandas as pd
6+
7+
print(pd.__version__)
8+
9+
df = pd.DataFrame(np.random.rand(5, 3))
10+
result = df.shift(6, axis=1, fill_value=None)
11+
12+
print(result)
13+
14+
expected = pd.DataFrame(np.full((5, 3), np.nan))
15+
16+
pd.testing.assert_frame_equal(result, expected)

0 commit comments

Comments
 (0)