Untitled
unknown
plain_text
2 years ago
320 B
7
Indexable
import pandas as pd
df = pd.read_csv('/datasets/vg_sales.csv')
cols = ['name', 'genre']
s_genres = ['Shooter', 'Simulation', 'Sports', 'Strategy']
#print(df[df['platform'].isin(handhelds)][['name', 'platform']])
df_filtered = df[~df['genre'].isin(s_genres) & ~df['name'].str.startswith('S')][cols]
print(df_filtered)Editor is loading...
Leave a Comment