Skip to content
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

DEPR: DataFrame.__getitem__[str] sometimes slices on index #31476

Closed
jbrockmendel opened this issue Jan 31, 2020 · 1 comment · Fixed by #36179
Closed

DEPR: DataFrame.__getitem__[str] sometimes slices on index #31476

jbrockmendel opened this issue Jan 31, 2020 · 1 comment · Fixed by #36179
Labels
Deprecate Functionality to remove in pandas Indexing Related to indexing on series/frames, not to indexes themselves Needs Discussion Requires discussion from core team before further action

Comments

@jbrockmendel
Copy link
Member

xref #31334, #9595

  • This is a tiny corner case, at least as measured by tests cases (2 tests reach this)
  • With this removed, the __getitem__ API becomes much simpler to describe: "DataFrame.getitem` is always column-based"
@jbrockmendel jbrockmendel added Deprecate Functionality to remove in pandas Indexing Related to indexing on series/frames, not to indexes themselves labels Jan 31, 2020
@jorisvandenbossche
Copy link
Member

jorisvandenbossche commented Jan 31, 2020

@jbrockmendel Can you be more clear or specific in the description of the issue? And give some examples of the behaviour you want to deprecate?

For example: do you want to deprecate all slicing in __getitem__, or only the slicing with a single string? Because in #31334, you never mentioned it is only about "single string" slicing, while the title here suggest otherwise.

With this removed, the getitem API becomes much simpler to describe: "DataFrame.getitem` is always column-based"

Assuming you only mean "partial datetime string slicing with a single string", note that __getitem__ still does row-based access (normal slicing, boolean masks). So the "getitem is always column-based" is a bit confusing. I suppose you mean: when passing a single, scalar label, it is always column-based.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas Indexing Related to indexing on series/frames, not to indexes themselves Needs Discussion Requires discussion from core team before further action
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants