File: indexes.rst

package info (click to toggle)
python-xarray 2025.08.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 11,796 kB
  • sloc: python: 115,416; makefile: 258; sh: 47
file content (87 lines) | stat: -rw-r--r-- 1,505 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
.. currentmodule:: xarray

Indexes
=======


.. seealso::
    See the Xarray gallery on `custom indexes <https://xarray-indexes.readthedocs.io/>`_ for more examples.


Creating indexes
----------------
.. autosummary::
   :toctree: ../generated/

   cftime_range
   date_range
   date_range_like
   indexes.RangeIndex.arange
   indexes.RangeIndex.linspace


Built-in Indexes
----------------

Default, pandas-backed indexes built-in to Xarray:

.. autosummary::
   :toctree: ../generated/

   indexes.PandasIndex
   indexes.PandasMultiIndex


More complex indexes built-in to Xarray:

.. autosummary::
   :toctree: ../generated/

   CFTimeIndex
   indexes.RangeIndex
   indexes.NDPointIndex
   indexes.CoordinateTransformIndex


Building custom indexes
-----------------------

These classes are building blocks for more complex Indexes:

.. autosummary::
   :toctree: ../generated/

   indexes.CoordinateTransform
   indexes.CoordinateTransformIndex
   indexes.NDPointIndex
   indexes.TreeAdapter

The Index base class for building custom indexes:

.. autosummary::
   :toctree: ../generated/

   Index
   Index.from_variables
   Index.concat
   Index.stack
   Index.unstack
   Index.create_variables
   Index.should_add_coord_to_array
   Index.to_pandas_index
   Index.isel
   Index.sel
   Index.join
   Index.reindex_like
   Index.equals
   Index.roll
   Index.rename
   Index.copy


The following are useful when building custom Indexes

.. autosummary::
   :toctree: ../generated/

   IndexSelResult