diff --git a/python/cudf/cudf/core/column/struct.py b/python/cudf/cudf/core/column/struct.py index d2f7e4de10b..266e448cdf3 100644 --- a/python/cudf/cudf/core/column/struct.py +++ b/python/cudf/cudf/core/column/struct.py @@ -125,7 +125,9 @@ def field(self, key): Parameters ---------- - index : int + key: int or str + index/position or field name of the respective + struct column Returns ------- @@ -138,6 +140,10 @@ def field(self, key): 0 1 1 3 dtype: int64 + >>> s.struct.field('a') + 0 1 + 1 3 + dtype: int64 """ fields = list(self._column.dtype.fields.keys()) if key in fields: diff --git a/python/cudf/cudf/utils/dtypes.py b/python/cudf/cudf/utils/dtypes.py index 6da338df3de..a8ff2177154 100644 --- a/python/cudf/cudf/utils/dtypes.py +++ b/python/cudf/cudf/utils/dtypes.py @@ -306,7 +306,7 @@ def cudf_dtype_to_pa_type(dtype): def cudf_dtype_from_pa_type(typ): - """ Given a cuDF Python dtype, converts it into the equivalent + """ Given a cuDF pyarrow dtype, converts it into the equivalent cudf pandas dtype. """ if pa.types.is_list(typ):