-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DEPR: row-based indexing in DataFrame.__getitem__ #31334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
3e6bcb0
3111114
b9b7ec4
30e0534
5d3f9c0
7e5614f
39e23ae
c94706e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -677,6 +677,7 @@ If index resolution is second, then the minute-accurate timestamp gives a | |
If the timestamp string is treated as a slice, it can be used to index ``DataFrame`` with ``[]`` as well. | ||
|
||
.. ipython:: python | ||
:okwarning: | ||
|
||
dft_minute = pd.DataFrame({'a': [1, 2, 3], 'b': [4, 5, 6]}, | ||
index=series_minute.index) | ||
|
@@ -689,7 +690,11 @@ If the timestamp string is treated as a slice, it can be used to index ``DataFra | |
|
||
To *always* have unambiguous selection, whether the row is treated as a slice or a single selection, use ``.loc``. | ||
|
||
As of version 1.1.0, row-based indexing is deprecated. Users should always use ``.loc`` | ||
for label-based row indexing. | ||
|
||
.. ipython:: python | ||
:okwarning: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this cause a warning? It's using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i took the kitchen-sink approach to getting the docbuild passing, will figure out which of these can be trimmed away |
||
|
||
dft_minute.loc['2011-12-31 23:59'] | ||
|
||
|
@@ -1982,6 +1987,7 @@ Passing a string representing a lower frequency than ``PeriodIndex`` returns par | |
As with ``DatetimeIndex``, the endpoints will be included in the result. The example below slices data starting from 10:00 to 11:59. | ||
|
||
.. ipython:: python | ||
:okwarning: | ||
|
||
dfp['2013-01-01 10H':'2013-01-01 11H'] | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the whitespace alignment is off here (
:okwarning:
anddft_minute...
should be vertically aligned)