Skip to content

BUG: resample with ArrowDtype #56371

New issue

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

Merged
merged 8 commits into from
Dec 9, 2023
Merged

Conversation

mroeschke
Copy link
Member

The current resample path heavily uses DatetimeIndex/TimedeltaIndex APIs, so it's kinda onerous to try to allow Index API methods. This essentially wraps the Arrow types into one of the two classes above and saves an _arrow_dtype for the output

@mroeschke mroeschke added Resample resample method Arrow pyarrow functionality labels Dec 6, 2023
@mroeschke mroeschke requested a review from rhshadrach as a code owner December 7, 2023 00:10
@mroeschke mroeschke added this to the 2.2 milestone Dec 7, 2023
],
)
def test_arrow_timestamp_resample(tz):
idx = Series(date_range("2020-01-01", periods=5), dtype="timestamp[ns][pyarrow]")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GH#


@td.skip_if_no("pyarrow")
def test_arrow_duration_resample():
idx = pd.Index(timedelta_range("1 day", periods=5), dtype="duration[ns][pyarrow]")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GH#

Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mroeschke mroeschke merged commit aa7b17e into pandas-dev:main Dec 9, 2023
@mroeschke mroeschke deleted the bug/arrow/resample branch December 9, 2023 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arrow pyarrow functionality Resample resample method
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Resample doesn't work for timestamp[ns][pyarrow]
2 participants