We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8689a7c commit a41ba3fCopy full SHA for a41ba3f
bisect/42396.py
@@ -0,0 +1,13 @@
1
+# BUG: astype() on an integer DataFrame changes the order of data #42396
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)]).iloc[:6, :3]
10
+result = df.astype("int32")
11
+print(result)
12
13
+pd.testing.assert_frame_equal(result, df, check_dtype=False)
0 commit comments