A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/46999 below:

Allow using datetime64[ns, UTC] in IntervalDtype · Issue #46999 · pandas-dev/pandas · GitHub

Pandas version checks Reproducible Example
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