Skip to content

Commit 11e5d42

Browse files
committed
test_generic.py - Add a test for astype dict errors ignore.
1 parent 7c2e092 commit 11e5d42

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pandas/tests/generic/test_generic.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,12 @@ def test_downcast(self):
202202
expected = o.astype(np.int64)
203203
self._compare(result, expected)
204204

205+
def test_multiple_astype_casts(self):
206+
df = DataFrame({'A': [1, 2, 'z'], 'B': [3, 4, 'z']})
207+
df.astype({'A': int,
208+
'B': 'datetime64[ns]'},
209+
errors='ignore')
210+
205211
def test_constructor_compound_dtypes(self):
206212
# see gh-5191
207213
# Compound dtypes should raise NotImplementedError.

0 commit comments

Comments
 (0)