Skip to content

Commit ea41caf

Browse files
authored
fix part of pandas-dev#14052
do not bypass _interleave() if single block but of type DatetimeTZBlock or CategoricalBlock
1 parent ea8791f commit ea41caf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/core/internals.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3424,7 +3424,8 @@ def as_matrix(self, items=None):
34243424
else:
34253425
mgr = self
34263426

3427-
if self._is_single_block or not self.is_mixed_type:
3427+
if ((self._is_single_block or not self.is_mixed_type)
3428+
and not isinstance(mgr.blocks[0], (DatetimeTZBlock, CategoricalBlock))):
34283429
return mgr.blocks[0].get_values()
34293430
else:
34303431
return mgr._interleave()

0 commit comments

Comments
 (0)