Skill area · Data Science & Analytics
Turn raw data into answers with Python and AI
Load it, clean it, analyze it, and show what it means
Real Python takes you from your first DataFrame to confident analysis with pandas, Polars, NumPy, and Matplotlib. Follow a guided path, practice on real datasets, and get help the moment you’re stuck.
import pandas as pd
df = pd.read_csv("recent-grads.csv")
df[["Major", "Major_category", "Total"]].head(3)
| Major | Major_category | Total | |
|---|---|---|---|
| 0 | Petroleum Eng. | Engineering | 2339 |
| 1 | Mining & Mineral Eng. | Engineering | 756 |
| 2 | Metallurgical Eng. | Engineering | 856 |
(df.groupby("Major_category")["Total"]
.sum().nlargest(5)
.plot.barh()) # Where do graduates go?
total graduates
Data Science & Analytics on Real Python
- 90+data science tutorials
- 40+video courses
- 40+interactive quizzes
- 60+coding exercises
- 5guided learning paths
What you’ll be able to do
The whole analysis workflow, one skill at a time
Data work follows the same arc whether you’re digging into sales numbers, survey results, or sensor logs. Real Python covers each step with hands-on material built around real datasets.
Collect and load
Read CSV, JSON, Excel, and SQL data into DataFrames, and query local files directly with DuckDB.
Clean and reshape
Handle missing values, fix messy columns, and merge, sort, and pivot datasets until they’re ready to trust.
Analyze
Group and aggregate, compute descriptive statistics and correlations, and fit your first regression models.
Visualize and share
Build clear charts, interactive dashboards, and maps, and present your work in reproducible notebooks.
Your roadmap
A clear path from first DataFrame to real analysis
Not sure where to start? Work through these learning paths in order. Each one mixes tutorials, video courses, quizzes, and exercises, and tracks your progress as you go.
- 1
Start here
Set up Jupyter, load CSV and JSON data into pandas, clean and group it, then plot and analyze it with Matplotlib and NumPy.
Learning Path
Data Science With Python Core Skills
22 Resources ⋅ Skills: Pandas, NumPy, Data Cleaning, Data Visualization, Statistics, CSV, JSON, Jupyter Notebooks
- 2
Go deeper on DataFrames: indexing, GroupBy, merging, sorting, pivot tables, and the performance tips that keep big analyses fast.
Learning Path
pandas for Data Science
15 Resources ⋅ Skills: pandas, Data Science, Data Visualization, DataFrame, GroupBy, Data Cleaning
- 3
Tell the story in your data with Matplotlib, Seaborn, Bokeh, Dash, and Folium, from quick plots to interactive dashboards and maps.
Learning Path
Data Visualization With Python
10 Resources ⋅ Skills: NumPy, Matplotlib, Bokeh, Seaborn, pandas, Dash, Folium, ggplot
- 4
Build the statistical foundations: descriptive statistics, correlation, linear and logistic regression, and gradient descent.
Learning Path
Math for Data Science
5 Resources ⋅ Skills: Statistics, Correlation, Linear Regression, Logistic Regression, NumPy, SciPy, pandas, Gradient Descent
- +
Take it anytime
Bring in data from files, Excel, SQL databases, and the cloud, and store your results so others can use them.
Learning Path
Data Collection & Storage
9 Resources ⋅ Skills: CSV, JSON, pandas, Excel, SQL, SQLite, SQLAlchemy, AWS S3, Databases
Ready for what comes next? Continue with Machine Learning With Python. New to Python itself? Start with Python Basics first.
Try it now
Rank college majors by popularity
This is a real exercise from the Plot With pandas video course, using the same dataset as the notebook above. Write your function in the editor and click Run Tests.
Running tests, hints, and solutions are included with a Real Python membership. Not a member yet? You can still read the task and write your solution before you join.
Learn it every way
Read it, watch it, test it, practice it
Every data science topic comes in the formats that help it stick. Mix them however you like.
Tutorials
In-depth, example-driven guides to pandas, Polars, NumPy, plotting, statistics, and more.
Browse tutorials →Video courses
Follow along as an instructor works through a real dataset, one bite-sized lesson at a time.
Start with Introduction to pandas →Quizzes
Check what you’ve learned in a few minutes and see exactly which concepts to review.
Test your core skills →Coding exercises
Write real pandas, Polars, and NumPy code in your browser and get instant test feedback.
How exercises work →Mentor AI
Stuck on a groupby? Ask right where you are
Data code fails in confusing ways: a KeyError from a column name with a stray space, a SettingWithCopyWarning, a result that’s a DataFrame when you expected a Series.
Mentor AI sees the tutorial, lesson, or exercise you’re on and your code, and nudges you toward the fix one hint at a time, so you understand what pandas is actually doing.
My test says it expected a Series, but df.groupby("Major_category")[["Total"]].sum() gives me a DataFrame. Why?
You’re really close! Look at the brackets around "Total". You’re passing a list of column names, and pandas keeps a list of columns as a DataFrame, even when the list has only one item.
What happens if you select the column with a single string instead?
Oh, ["Total"] instead of [["Total"]]. Now it’s a Series!
Exactly. Now the only failing test is about order. Which method could sort those totals from largest to smallest?
The modern data stack
Learn the tools data teams actually use
From long-standing staples to newer tools that are changing how Python developers work with data.
Fresh from the library
New and updated for 2026
The Real Python team keeps publishing and refreshing data science content, so what you learn matches the tools and versions you’ll use at work.
- TutorialPython Statistics Fundamentals: How to Describe Your Data
- CourseAutomating EDA With fg-data-profiling
- TutorialValidating Data With Pointblank in Python
- TutorialPython for Data Analysis: A Practical Guide
- TutorialAltair: Declarative Charts With Python
- QuizPython Statistics Fundamentals
- CourseIntroduction to pandas
Questions and answers
You should be comfortable with Python basics like variables, lists, loops, and functions. If you’re not there yet, the Python Basics learning path gets you ready, and you can switch to data science as soon as you finish it.
No. You can load, clean, analyze, and visualize data with very little math. When you want to go further, the Math for Data Science path explains statistics and regression with Python code rather than proofs.
Start with pandas. It’s the most widely used DataFrame library, and most examples and job postings assume it. Once you’re comfortable, Polars is a great addition for larger datasets. Our Polars vs pandas tutorial walks through the differences.
Not quite. Data science and analytics are about understanding data and communicating what it shows. Machine learning builds on those skills to train models that make predictions. When you’re ready for that step, continue with Machine Learning With Python.
Every Real Python membership includes all video courses, quizzes, coding exercises, and learning paths for data science and every other topic, along with Mentor AI as it rolls out.
Start making sense of your data
Get your free learning plan and follow the full data science roadmap, with courses, quizzes, coding exercises, and a mentor at your side.