Skip to content

Commit eb82913

Browse files
code sample for pandas-dev#42092
1 parent 0977799 commit eb82913

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

bisect/42092.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# BUG?: 1.3.0rc behavior change with concatenating boolean and numeric columns #42092
2+
3+
import pandas as pd
4+
5+
print(pd.__version__)
6+
7+
df1 = pd.DataFrame(pd.Series([True, False, True, True], dtype="bool"))
8+
df2 = pd.DataFrame(pd.Series([1, 0, 1], dtype="int64"))
9+
10+
result = pd.concat([df1, df2]) # dtype changed from int64 to object
11+
print(result)
12+
13+
assert result[0].dtype == "int64", result[0].dtype

0 commit comments

Comments
 (0)