Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
skirui-source committed Apr 5, 2021
1 parent 2f8380e commit 57713bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion python/cudf/cudf/core/column/struct.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/utils/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 57713bc

Please sign in to comment.