I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
dates = pd.date_range("2022", periods=3, tz="UTC") print(pd.IntervalIndex.from_arrays(dates[:-1], dates[1:])) print( pd.IntervalIndex.from_arrays( ["2022-01-01", "2022-01-02"], ["2022-01-02", "2022-01-03"], dtype="interval[datetime64[ns, UTC], right]", ) )Issue Description
raises TypeError: data type 'interval[datetime64[ns, UTC], right]' not understood
xref #46666
works for Interval of naive timeseries...
dates = pd.date_range("2022", periods=3)
print(pd.IntervalIndex.from_arrays(dates[:-1], dates[1:]))
print(
pd.IntervalIndex.from_arrays(
["2022-01-01", "2022-01-02"],
["2022-01-02", "2022-01-03"],
dtype="interval[datetime64[ns], right]",
)
)
Expected Behavior
IntervalIndex([(2022-01-01, 2022-01-02], (2022-01-02, 2022-01-03]], dtype='interval[datetime64[ns, UTC], right]')
Installed Versions
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4