Skip to content

Commit 8fce2a2

Browse files
committed
Add test
1 parent 5600a2f commit 8fce2a2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pandas/tests/frame/test_constructors.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,6 +1203,12 @@ def test_constructor_DataFrame(self, float_frame):
12031203
df_casted = DataFrame(float_frame, dtype=np.int64)
12041204
assert df_casted.values.dtype == np.int64
12051205

1206+
def test_constructor_empty_DataFrame(self):
1207+
1208+
actual = pd.DataFrame(pd.DataFrame(), dtype="object")
1209+
expected = pd.DataFrame([], dtype="object")
1210+
tm.assert_frame_equal(actual, expected)
1211+
12061212
def test_constructor_more(self, float_frame):
12071213
# used to be in test_matrix.py
12081214
arr = np.random.randn(10)

0 commit comments

Comments
 (0)