hipdf.DataFrame.attrs

Contents

hipdf.DataFrame.attrs#

19 min read time

Applies to Linux

property DataFrame.attrs: dict[Hashable, Any]#

Dictionary of global attributes of this dataset.

Notes#

Many operations that create new datasets will copy attrs. Copies are always deep so that changing attrs will only affect the present dataset. cudf.concat copies attrs only if all input datasets have the same attrs.

Examples#

For Series:

>>> import cudf
>>> ser = cudf.Series([1, 2, 3])
>>> ser.attrs = {"A": [10, 20, 30]}
>>> ser.attrs
{'A': [10, 20, 30]}

For DataFrame:

>>> df = cudf.DataFrame({'A': [1, 2], 'B': [3, 4]})
>>> df.attrs = {"A": [10, 20, 30]}
>>> df.attrs
{'A': [10, 20, 30]}