We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1029648 commit b97ba2aCopy full SHA for b97ba2a
bisect/42719.py
@@ -0,0 +1,16 @@
1
+# BUG: TypeError when shifting DataFrame created by concatenation of slices and fills with values #42719
2
+
3
+import numpy as np
4
+import pandas as pd
5
6
+print(pd.__version__)
7
8
+npa = np.random.RandomState(0).randint(1000, size=(20, 8))
9
+df = pd.DataFrame(npa, columns=[f"c{i}" for i in range(8)])
10
11
+df1 = df.iloc[:6, 3:5]
12
+df2 = df.iloc[:6, 6:8]
13
+df = pd.concat([df1, df2], axis=1)
14
15
+result = df.shift(periods=2, axis=1, freq=None, fill_value=0)
16
+print(result)
0 commit comments