🎓 All Courses | 📚 Python Programming Syllabus

📋 Study this course on TaskLoco
#python-programming#pandas#data-science

Pandas — Data Analysis Made Simple

Pandas provides DataFrames for tabular data. Install: pip install pandas.


import pandas as pd

df = pd.DataFrame({
    "name": ["Alice", "Bob", "Charlie"],
    "age": [30, 25, 35],
    "score": [95, 87, 92]
})

Exploring data:

df.head()          # first 5 rows
df.tail()          # last 5 rows
df.shape           # (rows, columns)
df.info()          # data types, nulls
df.describe()      # statistics

Selecting data:

df["name"]         # one column (Series)
df[["name","age"]] # multiple columns
df.iloc[0]         # first row by position
df.loc[0]          # row by label

Filtering:

df[df["age"] > 28]              # rows where age > 28
df[df["score"] >= 90]["name"]  # names with score >= 90

Reading files:

df = pd.read_csv("data.csv")
df = pd.read_excel("data.xlsx")
df.to_csv("output.csv", index=False)

YouTube • Top 10
Python Programming: Pandas Basics
Tap to Watch ›
📸
Google Images • Top 10
Python Programming: Pandas Basics
Tap to View ›

Reference:

Wikipedia: Pandas

image for linkhttps://en.wikipedia.org/wiki/Pandas_(software)

📚 Python Programming — Full Course Syllabus
📋 Study this course on TaskLoco

TaskLoco™ — The Sticky Note GOAT