Snippets Collections
c3 = pd.Series(['China', 'US'])
df[df['countries'].isin(c1)]
star

Sat Oct 31 2020 00:55:40 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/19960077/how-to-filter-pandas-dataframe-using-in-and-not-in-like-in-sql

#pandas #isin #filter

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension