Skip to content

Conversation

@benbovy
Copy link
Member

@benbovy benbovy commented Jul 8, 2025

  • the default PandasIndex
  • stick coordinates together with PandasMultiIndex
  • large integer ranges with pandas.RangeIndex
  • float ranges with RangeIndex

benbovy and others added 16 commits July 8, 2025 20:18
Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
This is needed for pd.RangeIndex with "lazy" coordinate variable. This
will be needed for NDPointIndex too.

TODO: remove when next version of Xarray is released.
ds_air.sel(time="2013")
```

### Set indexes for non-dimension coordinates
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
### Set indexes for non-dimension coordinates
### Set indexes for any coordinate variable

Copy link
Contributor

@dcherian dcherian left a comment

Choose a reason for hiding this comment

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

Nice!

Would be good to link to RangeIndex and RasterIndex as examples in the CoordinateTransformIndex page. I think you have mentioned this already, but just writing it out as a reminder

benbovy and others added 3 commits July 9, 2025 09:35
Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
@benbovy benbovy closed this Jul 9, 2025
@benbovy benbovy reopened this Jul 9, 2025
@benbovy
Copy link
Member Author

benbovy commented Jul 9, 2025

Thanks for the review @dcherian and @scottyhq !

I'm merging this now.

Would be good to link to RangeIndex and RasterIndex as examples in the CoordinateTransformIndex page. I think you have mentioned this already, but just writing it out as a reminder

Will do in a follow-up PR.

@benbovy benbovy merged commit b63f78a into xarray-contrib:main Jul 9, 2025
2 checks passed
@benbovy benbovy deleted the more-builtin-indexes branch July 9, 2025 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants