๐ผ
STUDENT NOTES ยท DAY 20 OF 24
The Data Panda ๐ผ
A DataFrame is an Excel sheet that obeys code. Meet pandas โ the tool data scientists open every single day.
1Your first DataFrame
๐
Py: Rows and named columns โ a table! Load any CSV with pd.read_csv("file.csv") and you get exactly this.
2One column, instant answers
๐ค
Bittu: No loops needed โ I iterate inside. You just describe WHAT you want.
3Filtering โ only the rows you want
๐ฆ
Professor Hoot: Read it aloud: "df where df marks >= 75". Pandas filters like a bouncer with a list.
4groupby โ the most useful line in data analysis
๐
Py: Split by team โ average each group. Marks per class, sales per city, goals per team โ same one line every time.
5Quick quiz! ๐ง
df.head() showsโฆ
๐ก A quick peek at the top of the table โ always your first move after loading data.
Average marks per section, one line:
๐ก groupby splits, mean computes per group. Memorize this shape โ you'll type it forever.
6Your mission ๐
Mission 1: Build a DataFrame of 5 friends: name, age, favourite snack. Print .head().
Mission 2: Filter friends older than your age.
Mission 3: In class: load the shared marks.csv and find the average per section with groupby.
Day 20 done โ the panda approves! ๐ผ
Next: web scraping โ harvest data straight from web pages.
Go to Day 21: Web Scraping โ