diff --git a/modin/core/storage_formats/base/query_compiler.py b/modin/core/storage_formats/base/query_compiler.py index bc311201d91..ada3f3db3d3 100644 --- a/modin/core/storage_formats/base/query_compiler.py +++ b/modin/core/storage_formats/base/query_compiler.py @@ -1242,11 +1242,13 @@ def columnarize(self): if self._shape_hint == "column": return self + result = self if len(self.columns) != 1 or ( len(self.index) == 1 and self.index[0] == MODIN_UNNAMED_SERIES_LABEL ): - return self.transpose() - return self + result = self.transpose() + result._shape_hint = "column" + return result def is_series_like(self): """