Skip to content

Commit bd88c60

Browse files
TST: add test to confirm GH14606 (specify category dtype for empty)
Issue #14606 was fixed by PR #14717, adding one more specific test to confirm this
1 parent 08d7b2c commit bd88c60

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pandas/io/tests/parser/dtypes.py

+3
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ def test_empty_dtype(self):
241241
result = self.read_csv(StringIO(data), header=0,
242242
dtype='category')
243243
tm.assert_frame_equal(result, expected)
244+
result = self.read_csv(StringIO(data), header=0,
245+
dtype={'a': 'category', 'b': 'category'})
246+
tm.assert_frame_equal(result, expected)
244247

245248
expected = pd.DataFrame(columns=['a', 'b'], dtype='datetime64[ns]')
246249
result = self.read_csv(StringIO(data), header=0,

0 commit comments

Comments
 (0)