Explain
Pandas: the minimum you need right now
Pandas is your “spreadsheet with superpowers”. The trick is not memorizing pandas—it's printing your data after every tiny step so you don’t wander into the forest.
TL;DR
- Before math: print
shape,dtypes,head. groupbygives you counts/means/winrate quickly.- Sort before time-based stuff (streaks, trends, rolling).
The three sanity prints
print(df.shape)
print(df.dtypes)
print(df.head(3).to_string(index=False)) Two patterns you will use constantly
Counts / averages / winrate
# counts
champ_counts = df.groupby('champion').size().sort_values(ascending=False)
# averages
avg_kills = df.groupby('champion')['kills'].mean()
# winrate (mean of bool / 1-0)
winrate = df.groupby('champion')['win'].mean() If anything looks wrong: stop, print, fix the data. Charts and summaries only reflect what’s inside the dataframe.