We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The IntervalIndex constructor takes a dtype parameter but doesn't use it (no references to it in the code):
IntervalIndex
dtype
In [2]: pd.IntervalIndex([pd.Interval(0, 1), pd.Interval(2, 3)], dtype='float64') Out[2]: IntervalIndex([(0, 1], (2, 3]] closed='right', dtype='interval[int64]')
The constructor methods do not support a dtype parameter:
In [3]: pd.IntervalIndex.from_intervals([pd.Interval(0, 1), pd.Interval(2, 3)], dtype='float64') --------------------------------------------------------------------------- TypeError: from_intervals() got an unexpected keyword argument 'dtype' In [4]: pd.IntervalIndex.from_arrays([0, 2], [1, 3], dtype='float64') --------------------------------------------------------------------------- TypeError: from_arrays() got an unexpected keyword argument 'dtype' In [5]: pd.IntervalIndex.from_breaks([0, 1, 2, 3], dtype='float64') --------------------------------------------------------------------------- TypeError: from_breaks() got an unexpected keyword argument 'dtype' In [6]: pd.IntervalIndex.from_tuples([(0, 1), (2, 3)], dtype='float64') --------------------------------------------------------------------------- TypeError: from_tuples() got an unexpected keyword argument 'dtype'
I'd expect the IntervalIndex constructor and constructor methods to support a dtype parameter, which can be used to override the inferred dtype.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Code Sample, a copy-pastable example if possible
The
IntervalIndex
constructor takes adtype
parameter but doesn't use it (no references to it in the code):The constructor methods do not support a
dtype
parameter:Expected Output
I'd expect the
IntervalIndex
constructor and constructor methods to support adtype
parameter, which can be used to override the inferred dtype.The text was updated successfully, but these errors were encountered: