MCPcopy Index your code
hub / github.com/holoviz/hvplot / sel

Method sel

hvplot/xarray.py:13–24  ·  view source on GitHub ↗
(self, **kwargs)

Source from the content-addressed store, hash-verified

11 return isinstance(obj, (xr.DataArray, xr.Dataset))
12
13 def sel(self, **kwargs):
14 processed = {}
15 for k, v in kwargs.items():
16 if isinstance(v, type) and issubclass(v, Widget):
17 if hasattr(v, 'end'):
18 values = self._current[k].values
19 v = v(name=k, start=values.min(), end=values.max())
20 if hasattr(v, 'options'):
21 v = v(name=k, options={str(v): v for v in self._current[k].values})
22 processed[k] = v
23 self._method = 'sel'
24 return self.__call__(**processed)
25
26 sel.__doc__ = xr.DataArray.sel.__doc__
27

Calls 1

__call__Method · 0.45