Skip to content

CLN: Nitpicks #33464

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
Apr 11, 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
2 changes: 1 addition & 1 deletion pandas/_libs/reshape.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ctypedef fused reshape_t:

@cython.wraparound(False)
@cython.boundscheck(False)
def unstack(reshape_t[:, :] values, uint8_t[:] mask,
def unstack(reshape_t[:, :] values, const uint8_t[:] mask,
Py_ssize_t stride, Py_ssize_t length, Py_ssize_t width,
reshape_t[:, :] new_values, uint8_t[:, :] new_mask):
"""
Expand Down
7 changes: 3 additions & 4 deletions pandas/core/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ def _getitem_nested_tuple(self, tup: Tuple):
# this is iterative
obj = self.obj
axis = 0
for i, key in enumerate(tup):
for key in tup:

if com.is_null_slice(key):
axis += 1
Expand Down Expand Up @@ -1420,7 +1420,7 @@ def _is_scalar_access(self, key: Tuple) -> bool:
if len(key) != self.ndim:
return False

for i, k in enumerate(key):
for k in key:
if not is_integer(k):
return False

Expand Down Expand Up @@ -2234,8 +2234,7 @@ def is_nested_tuple(tup, labels) -> bool:
if not isinstance(tup, tuple):
return False

for i, k in enumerate(tup):

for k in tup:
if is_list_like(k) or isinstance(k, slice):
return isinstance(labels, ABCMultiIndex)

Expand Down
4 changes: 1 addition & 3 deletions pandas/core/internals/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
make_block,
)

from pandas.io.formats.printing import pprint_thing

# TODO: flexible with index=None and/or items=None

T = TypeVar("T", bound="BlockManager")
Expand Down Expand Up @@ -325,7 +323,7 @@ def __repr__(self) -> str:
output += f"\nAxis {i}: {ax}"

for block in self.blocks:
output += f"\n{pprint_thing(block)}"
output += f"\n{block}"
return output

def _verify_integrity(self) -> None:
Expand Down