【发布时间】:2021-08-19 00:35:40
【问题描述】:
我的数据框中有一列包含不同长度的字符串列表,如下所示:
names venue
[Instagrammable, Restaurants, Vegan] 14 Hills
[Date Night, Vibes, Drinks] Upper 14
[Date Night, Drinks, After Work Drinks, Cocktail] Hills
. .
. .
.
现在,如果我想检查我的数据框中是否存在某些列表,该怎么做。
Example1:
Input :
find_list=[Date Night, Vibes, Drinks]
venue = 'Upper 14'
Output:
Record is present in my dataframe
Example 2:
Input :
find_list=[Date Night, Drinks]
venue='Hills 123'
Output:
Record is not present in my dataframe
例子
Input :
find_list=[ Date Night, Vibes, Drinks]
venue = 'Upper 14'
Output:
Record is not present in my dataframe
【问题讨论】:
标签: python pandas list dataframe