Skip to content

Commit d009049

Browse files
committed
fixed issue
Signed-off-by: Soumik Dutta <[email protected]>
1 parent 8a75be1 commit d009049

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

pandas/core/indexes/base.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,9 +1149,7 @@ def astype(self, dtype, copy: bool = True):
11491149
# NumericIndex[int32] and not Int64Index with dtype int64.
11501150
# When Int64Index etc. are removed from the code base, removed this also.
11511151
if isinstance(dtype, np.dtype) and is_numeric_dtype(dtype):
1152-
return self._constructor(
1153-
new_values
1154-
)
1152+
return self._constructor(new_values)
11551153
return Index(new_values, name=self.name, dtype=new_values.dtype, copy=False)
11561154

11571155
_index_shared_docs[
@@ -6481,9 +6479,7 @@ def map(self, mapper, na_action=None):
64816479
if self._is_backward_compat_public_numeric_index and is_numeric_dtype(
64826480
new_values.dtype
64836481
):
6484-
return self._constructor(
6485-
new_values
6486-
)
6482+
return self._constructor(new_values)
64876483

64886484
return Index._with_infer(new_values, dtype=dtype, copy=False, name=self.name)
64896485

0 commit comments

Comments
 (0)