Skip to content
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
6 changes: 4 additions & 2 deletions pandas/core/internals/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,9 @@ def astype(self, dtype, copy: bool = False, errors: str = "raise"):

# astype formatting
else:
values = self.get_values()
# Because we have neither is_extension nor is_datelike,
# self.values already has the correct shape
values = self.values

else:
values = self.get_values(dtype=dtype)
Expand Down Expand Up @@ -663,7 +665,7 @@ def _can_hold_element(self, element: Any) -> bool:

def to_native_types(self, slicer=None, na_rep="nan", quoting=None, **kwargs):
""" convert to our native types format, slicing if desired """
values = self.get_values()
values = self.values

if slicer is not None:
values = values[:, slicer]
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/internals/concat.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def get_reindexed_values(self, empty_dtype, upcasted_na):
else:
# No dtype upcasting is done here, it will be performed during
# concatenation itself.
values = self.block.get_values()
values = self.block.values

if not self.indexers:
# If there's no indexing to be done, we want to signal outside
Expand Down