Skip to content

Commit 931968f

Browse files
TST: Ensure dtypes are set correctly for empty integer columns pandas-dev#24386
1 parent aaa9cd0 commit 931968f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandas/tests/dtypes/test_dtypes.py

+4
Original file line numberDiff line numberDiff line change
@@ -991,3 +991,7 @@ def test_is_dtype_no_warning(check):
991991

992992
with tm.assert_produces_warning(None):
993993
check(data["A"])
994+
995+
def test_check_dtype_empty_column():
996+
data = pd.DataFrame({"a": [1, 2]}, columns=['b'], dtype=int)
997+
assert data.b.dtype is np.dtype('int')

0 commit comments

Comments
 (0)