Skip to content

Commit a4897d0

Browse files
jbrockmendelPingviinituutti
authored andcommitted
remove unused kwarg (pandas-dev#24695)
1 parent 18e2c67 commit a4897d0

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

pandas/core/internals/blocks.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ def astype(self, dtype, copy=False, errors='raise', values=None, **kwargs):
534534
**kwargs)
535535

536536
def _astype(self, dtype, copy=False, errors='raise', values=None,
537-
klass=None, **kwargs):
537+
**kwargs):
538538
"""Coerce to the new type
539539
540540
Parameters
@@ -599,14 +599,14 @@ def _astype(self, dtype, copy=False, errors='raise', values=None,
599599
return self.copy()
600600
return self
601601

602-
if klass is None:
603-
if is_sparse(self.values):
604-
# special case sparse, Series[Sparse].astype(object) is sparse
605-
klass = ExtensionBlock
606-
elif is_object_dtype(dtype):
607-
klass = ObjectBlock
608-
elif is_extension_array_dtype(dtype):
609-
klass = ExtensionBlock
602+
klass = None
603+
if is_sparse(self.values):
604+
# special case sparse, Series[Sparse].astype(object) is sparse
605+
klass = ExtensionBlock
606+
elif is_object_dtype(dtype):
607+
klass = ObjectBlock
608+
elif is_extension_array_dtype(dtype):
609+
klass = ExtensionBlock
610610

611611
try:
612612
# force the copy here

0 commit comments

Comments
 (0)