【发布时间】:2020-12-04 05:56:10
【问题描述】:
if((pd['data'].str.startswith('aha' | 'bou')) & (pd[‘data1’].str.startswith(‘aha’|’bou’)))
我正在使用我想从数据帧中读取的熊猫,并将以 aha 和 bou 开头的两列数据附加到列表中。在检查我得到的条件时
TypeError : |: 'str' 和 'str' 的操作数类型不受支持
【问题讨论】:
标签: python pandas string typeerror unsupportedoperation