Skip to content

Commit 575fd57

Browse files
committed
added test for issue pandas-dev#32218
1 parent 23f74d3 commit 575fd57

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pandas/tests/frame/test_constructors.py

+6
Original file line numberDiff line numberDiff line change
@@ -2639,6 +2639,12 @@ def test_construction_empty_array_multi_column_raises(self):
26392639
with pytest.raises(ValueError, match=msg):
26402640
DataFrame(data=np.array([]), columns=["a", "b"])
26412641

2642+
def test_construct_with_strings_and_none(self):
2643+
# GH#32218
2644+
df = DataFrame(["1", "2", None], columns=["a"], dtype="str")
2645+
expected = df = DataFrame({"a": ["1", "2", None]}, dtype="str")
2646+
tm.assert_frame_equal(df, expected)
2647+
26422648

26432649
class TestDataFrameConstructorIndexInference:
26442650
def test_frame_from_dict_of_series_overlapping_monthly_period_indexes(self):

0 commit comments

Comments
 (0)