text_plain_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

df = pd.read_csv('/kaggle/input/videogamesales/vgsales.csv')
df

dfsorted = df.sort_values('Global_Sales', ascending=False)
top20 = dfsorted.head(20)
top20

NAsorted = df.sort_values('NA_Sales', ascending=False)
NA_median = NAsorted['NA_Sales'].median()
surrounding_games = NAsorted.loc[(NAsorted['NA_Sales'] >= NA_median) & (NAsorted['NA_Sales'] <= NA_median)].head(10)
print(NA_median)
surrounding_games