Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add interval accessor.#10445

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
dcherian wants to merge1 commit intopydata:main
base:main
Choose a base branch
Loading
fromdcherian:interval-accessor

Conversation

dcherian
Copy link
Contributor

@dcheriandcherian commentedJun 26, 2025
edited
Loading

Quick attempt at

  1. CF-compliant encoding of Variables wrapping pd.IntervalArray totwo variables.
  2. decoding of CF-compliant bounds variables (e.g.time_bounds) to an IntervalArray. For this to be useful when a central valuetime is present requires that we droptime, create the intervalindex fortime_bounds and then assign that astime.

Alternatively we might not want to record the "central value" on encode. Then we could simply have a 1D Variable(pd.IntervalArray) -> 2D Variable encoding pipeline with attributes:

  1. closed: 'left'. which side of the interval is closed?
  2. xarray_dtype: 'pandas_interval'. tells Xarray to decode to thepd.Interval dtype
  3. bounds_dim_name: 'bounds' that identifies the dimension with size-2 (left & right edges)

This is not CF-compliant but would let usclose#2847

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Cannot store data aftergroupby_bins
1 participant
@dcherian

[8]ページ先頭

©2009-2025 Movatter.jp