Skip to content

Commit 44e95e6

Browse files
committed
DOC: Clarify how Index.__new__ handles dtype
Partially addresses pandas-devgh-15823.
1 parent 12016fe commit 44e95e6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pandas/core/indexes/base.py

+3
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ class Index(IndexOpsMixin, PandasObject):
181181
----------
182182
data : array-like (1-dimensional)
183183
dtype : NumPy dtype (default: object)
184+
If dtype is None, we find the dtype that best fits the data.
185+
If an actual dtype is provided, we coerce to that dtype if it's safe.
186+
Otherwise, an error will be raised.
184187
copy : bool
185188
Make a copy of input ndarray
186189
name : object

0 commit comments

Comments
 (0)