Skip to content

Commit d4a2554

Browse files
committed
fix call of reshape on dti, only call on ndarray
1 parent 99e71d4 commit d4a2554

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pandas/core/internals.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -2390,11 +2390,12 @@ def get_values(self, dtype=None):
23902390
f = lambda x: lib.Timestamp(x, tz=self.values.tz)
23912391
values = lib.map_infer(
23922392
self.values.ravel(), f).reshape(self.values.shape)
2393+
2394+
if values.ndim == self.ndim - 1:
2395+
values = values.reshape((1,) + values.shape)
23932396
else:
2394-
values = self.values
2397+
return self.values
23952398

2396-
if values.ndim == self.ndim - 1:
2397-
values = values.reshape((1,) + values.shape)
23982399
return values
23992400

24002401
def to_object_block(self, mgr):

0 commit comments

Comments
 (0)