Skip to content

Commit 7c2e092

Browse files
committed
Pass the errors and kwargs arguments through to astype in the columns dict logic branch.
1 parent 95c78d6 commit 7c2e092

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/core/generic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5716,7 +5716,8 @@ def astype(self, dtype, copy=True, errors='raise', **kwargs):
57165716
results = []
57175717
for col_name, col in self.iteritems():
57185718
if col_name in dtype:
5719-
results.append(col.astype(dtype[col_name], copy=copy))
5719+
results.append(col.astype(dtype=dtype[col_name], copy=copy,
5720+
errors=errors, **kwargs))
57205721
else:
57215722
results.append(results.append(col.copy() if copy else col))
57225723

0 commit comments

Comments
 (0)