Skip to content

Commit a01b363

Browse files
code sample for pandas-dev#43422
1 parent eda7729 commit a01b363

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

bisect/43422.py

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# BUG: Regression in 1.3.0: Exception when setting arrays as cell values #43422
2+
3+
from numpy import zeros
4+
5+
import pandas as pd
6+
from pandas import DataFrame
7+
8+
print(pd.__version__)
9+
10+
# (Leaving out the dtype doesn't change things)
11+
frame = DataFrame(columns=["x", "P"], dtype=object)
12+
data = {"x": zeros((2,)), "P": zeros((2, 2))}
13+
expected = frame.append(data, ignore_index=True)
14+
15+
frame.loc[0] = data
16+
print(frame)
17+
18+
pd.testing.assert_frame_equal(frame, expected)

0 commit comments

Comments
 (0)