Numeric Index constructors should validate dtype
parameter
#29539
Labels
Constructors
Series/DataFrame/Index/pd.array Constructors
Dtype Conversions
Unexpected or buggy dtype conversions
Error Reporting
Incorrect or improved errors from pandas
Index
Related to the Index class or subclasses
Milestone
The
Int64Index
,UInt64Index
, andFloat64Index
constructors do not validate thedtype
parameter and instead ignore it when it conflicts with the default dtype:Other index types do not allow non-standard dtypes:
Expected Output
I'd expect
In [2]
/In [3]
/In [4]
to raise aValueError
.The text was updated successfully, but these errors were encountered: