BUG/API: Index constructor does not enforce specified dtype #21311
Labels
Bug
Constructors
Series/DataFrame/Index/pd.array Constructors
Dtype Conversions
Unexpected or buggy dtype conversions
Index
Related to the Index class or subclasses
Milestone
Code Sample, a copy-pastable example if possible
Manually specifying a dtype does not garantuee the output is in that dtype. Eg with Series if incompatible data is passed, an error is raised, while for Index it just silently outputs another dtype:
The text was updated successfully, but these errors were encountered: