Skip to content

Commit 1fb3dbb

Browse files
committed
misc
1 parent 51c07b7 commit 1fb3dbb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modin/core/dataframe/pandas/dataframe/dataframe.py

+2
Original file line numberDiff line numberDiff line change
@@ -4698,6 +4698,8 @@ def to_pandas(self):
46984698
df = self._partition_mgr_cls.to_pandas(self._partitions)
46994699
if df.empty:
47004700
df = pandas.DataFrame(columns=self.columns, index=self.index)
4701+
if len(df.columns) and self.has_materialized_dtypes:
4702+
df = df.astype(self.dtypes)
47014703
else:
47024704
for axis, has_external_index in enumerate(
47034705
["has_materialized_index", "has_materialized_columns"]

0 commit comments

Comments
 (0)