Python -- Pandas:根据列数据取多行
lt = [['zoo',2],['foo',1],['zff',2],['zoo',6],['dff',0]]df = pd.DataFrame(lt, columns=['string','int'])dfstring int0 zoo 21 foo 12 zff 23 zoo 64 dff 0df[ df['string'].isin( ['zoo','zff'] ) ] # 一列数据满足多个值的行string int0 zoo 22 zff 23 zoo 6df