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 authored Nov 20, 2024
1 parent fbe7f09 commit 8b01833
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 @@ -4113,10 +4113,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 8b01833

Please sign in to comment.