home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 191826844

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/767#issuecomment-191826844 https://api.github.com/repos/pydata/xarray/issues/767 191826844 MDEyOklzc3VlQ29tbWVudDE5MTgyNjg0NA== 1217238 2016-03-03T16:00:50Z 2016-03-03T16:00:50Z MEMBER

If you try that doing that indexing with a pandas.Series, you actually get an error message:

``` In [71]: s.loc['bar', slice(4000, 4100.3)]

...

/Users/shoyer/conda/envs/xarray-dev/lib/python3.5/site-packages/pandas/core/indexing.py in _getitem_axis(self, key, axis) 1363 # nested tuple slicing 1364 if is_nested_tuple(key, labels): -> 1365 locs = labels.get_locs(key) 1366 indexer = [ slice(None) ] * self.ndim 1367 indexer[axis] = locs

/Users/shoyer/conda/envs/xarray-dev/lib/python3.5/site-packages/pandas/core/index.py in get_locs(self, tup) 5692 if not self.is_lexsorted_for_tuple(tup): 5693 raise KeyError('MultiIndex Slicing requires the index to be fully lexsorted' -> 5694 ' tuple len ({0}), lexsort depth ({1})'.format(len(tup), self.lexsort_depth)) 5695 5696 # indexer KeyError: 'MultiIndex Slicing requires the index to be fully lexsorted tuple len (2), lexsort depth (0,) ```

I guess it's also worth investigating get_locs as an alternative or companion to get_loc_level.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  134359597
Powered by Datasette · Queries took 0.827ms · About: xarray-datasette