【发布时间】:2018-08-10 21:53:13
【问题描述】:
如何只显示文本中包含 * AV * 之类的单词的行,例如“AV Snow”或“AV (Some)”或“Me AV”
# Select Structural status = 'AVAILABLE' or like *AV*
value_list = ['AVAILABLE', '[AV]']
'[AV]' 似乎不正确
# Grab DataFrame rows where column has certain values
new_df = df[df.STRUCTURALSTATUS.isin(value_list)]
new_df.shape
【问题讨论】:
标签: python regex string pandas