Skip to content

TYP: NDFrame.(loc|iloc|at|iat) #30690

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

Merged
merged 2 commits into from
Jan 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def _single_replace(self, to_replace, method, inplace, limit):
bool_t = bool # Need alias because NDFrame has def bool:


class NDFrame(PandasObject, SelectionMixin):
class NDFrame(PandasObject, SelectionMixin, indexing.IndexingMixin):
"""
N-dimensional analogue of DataFrame. Store multi-dimensional in a
size-mutable, labeled data structure
Expand Down Expand Up @@ -3181,7 +3181,10 @@ def to_csv(

@classmethod
def _create_indexer(cls, name: str, indexer) -> None:
"""Create an indexer like _name in the class."""
"""Create an indexer like _name in the class.

Kept for compatibility with geopandas. To be removed in the future. See GH27258
"""
if getattr(cls, name, None) is None:
_indexer = functools.partial(indexer, name)
setattr(cls, name, property(_indexer, doc=indexer.__doc__))
Expand Down Expand Up @@ -11176,8 +11179,3 @@ def logical_func(self, axis=0, bool_only=None, skipna=True, level=None, **kwargs
)

return set_function_name(logical_func, name, cls)


# install the indexes
for _name, _indexer in indexing.get_indexers_list():
NDFrame._create_indexer(_name, _indexer)
Loading