Skip to content

Commit

Permalink
Update python/cudf/cudf/core/dataframe.py
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew Murray <[email protected]>
  • Loading branch information
mroeschke and Matt711 committed Nov 20, 2024
1 parent 77c0289 commit 2abc5f4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/cudf/cudf/core/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 2abc5f4

Please sign in to comment.