8000 CLN: misc cleanups by jbrockmendel · Pull Request #30877 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

CLN: misc cleanups #30877

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 8 commits into from
Jan 13, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
revert annotations
  • Loading branch information
jbrockmendel committed Jan 13, 2020
commit 7f7531d51063ad60aa0cc7e8342ed599a996380a
2 changes: 1 addition & 1 deletion pandas/core/arrays/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -2279,7 +2279,7 @@ def _from_factorized(cls, uniques, original):
original.categories.take(uniques), dtype=original.dtype
)

def equals(self, other) -> bool:
def equals(self, other):
"""
Returns True if categorical arrays are equal.

Expand Down
2 changes: 1 addition & 1 deletion pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1347,7 +1347,7 @@ def _indexed_same(self, other) -> bool:
self._get_axis(a).equals(other._get_axis(a)) for a in self._AXIS_ORDERS
)

def equals(self, other) -> bool_t:
def equals(self, other):
"""
Test whether two objects contain the same elements.

Expand Down
2 changes: 1 addition & 1 deletion pandas/core/indexes/datetimelike.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def equals(self, other) -> bool:
return np.array_equal(self.asi8, other.asi8)

@Appender(_index_shared_docs["contains"] % _index_doc_kwargs)
def __contains__(self, key) -> bool:
def __contains__(self, key):
try:
res = self.get_loc(key)
except (KeyError, TypeError, ValueError):
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/indexes/range.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ def argsort(self, *args, **kwargs):
else:
return np.arange(len(self) - 1, -1, -1)

def equals(self, other) -> bool:
def equals(self, other):
"""
Determines if two Index objects contain the same elements.
"""
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/internals/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,7 @@ def take(self, indexer, axis=1, verify=True, convert=True):
new_axis=new_labels, indexer=indexer, axis=axis, allow_dups=True
)

def equals(self, other) -> bool:
def equals(self, other):
self_axes, other_axes = self.axes, other.axes
if len(self_axes) != len(other_axes):
return False
Expand Down
< 3069 /div>
0