You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the more convoluted parts of Series.__getitem__ is for handling single-entry lists that contain a slice, where we end up just returning self[key[0]]. We have two tests that hit this path, but it isn't clear to me why this should be supported.
The text was updated successfully, but these errors were encountered:
Can you give a code example? This isn't involved with MultiIndex?
dti = pd.date_range("2016-01-01", periods=5)
ser = pd.Series(range(5), index=dti)
key = [slice(0, 3)]
>>> ser[key]
pandas/core/internals/blocks.py:313: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.
return self.values[slicer]
pandas/core/arrays/datetimelike.py:542: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.
result = getitem(key)
2016-01-01 0
2016-01-02 1
2016-01-03 2
dtype: int64
One of the more convoluted parts of
Series.__getitem__
is for handling single-entry lists that contain a slice, where we end up just returningself[key[0]]
. We have two tests that hit this path, but it isn't clear to me why this should be supported.The text was updated successfully, but these errors were encountered: