Shortcuts

torcharrow.Column.isin

Column.isin(values: Union[list, dict])

检查列中的每个元素是否包含在值中。

Parameters:
  • 类似数组 (值 -) – 要检查存在性的值。

  • dict (列或) – 要检查存在性的值。

Return type:

布尔值的列,指示每个元素是否在值中。

示例

>>> import torcharrow as ta
>>> df = ta.dataframe({'a': list(range(7)),
>>>             'b': list(reversed(range(7))),
>>>             'c': list(range(7))
>>>            })
>>> df[df['a'].isin([5])]
  index    a    b    c    d
-------  ---  ---  ---  ---
      0    5    1    5  104
dtype: Struct([Field('a', int64), Field('b', int64), Field('c', int64), Field('d', int64)]), count: 1, null_count: 0