diff --git a/pandas/core/generic.py b/pandas/core/generic.py index cccf8215de196c..1818b9cfdb5a28 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -727,7 +727,7 @@ def transpose(self, *args, **kwargs): nv.validate_transpose(tuple(), kwargs) result = self._constructor(new_values, **new_axes).__finalize__(self) - if len(self.columns) and (self.dtypes == self.dtypes.iloc[0]).all(): + if self.ndim == 2 and self._is_homogeneous_type: # FIXME: self.dtypes[0] can fail in tests if is_extension_array_dtype(self.dtypes.iloc[0]): # Retain ExtensionArray dtypes through transpose;