rapidsai / cudf

cuDF - GPU DataFrame Library
https://docs.rapids.ai/api/cudf/stable/
Apache License 2.0
8.5k stars 908 forks source link

[BUG] Unable to set the `names` attribute of `DataFrame.columns` #17482

Open Matt711 opened 1 day ago

Matt711 commented 1 day ago

Describe the bug See the reproducer

Steps/Code to reproduce bug cudf:

import cudf

df = cudf.DataFrame({"a":[1,2]})
print(df.columns.names)

df.columns.names = ["foo"]

print(df.columns.names)
[None]
[None]

pandas:

import pandas as pd

df = pd.DataFrame({"a":[1,2]})
print(df.columns.names)

df.columns.names = ["foo"]

print(df.columns.names)
[None]
['foo']

Expected behavior Match pandas

Matt711 commented 1 day ago

xref #17481

mroeschke commented 56 minutes ago

xref https://github.com/rapidsai/cudf/issues/14012 too