From 2abc5f4f1fde43c1211468ba7577ecfeb38965bd Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Tue, 19 Nov 2024 16:22:11 -0800 Subject: [PATCH] Update python/cudf/cudf/core/dataframe.py Co-authored-by: Matthew Murray <41342305+Matt711@users.noreply.github.com> --- python/cudf/cudf/core/dataframe.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/cudf/cudf/core/dataframe.py b/python/cudf/cudf/core/dataframe.py index 7b18e405b7c..f7fd2238a50 100644 --- a/python/cudf/cudf/core/dataframe.py +++ b/python/cudf/cudf/core/dataframe.py @@ -4089,10 +4089,11 @@ def transpose(self): if any(c.dtype != source_columns[0].dtype for c in source_columns): raise ValueError("Columns must all have the same dtype") - input_table = plc.table.Table( - [col.to_pylibcudf(mode="read") for col in source_columns] + result_table = plc.transpose.transpose( + plc.table.Table( + [col.to_pylibcudf(mode="read") for col in source_columns] + ) ) - result_table = plc.transpose.transpose(input_table) result_columns = [ libcudf.column.Column.from_pylibcudf(col, data_ptr_exposed=True) for col in result_table.columns()