Home / Guides

Python vs. R for Data Science: Which Should You Learn First?

People argue about this online as if it were a sport. Here is the calm version.

The quick answer

If you want the most job options and a language you can use beyond analysis, learn Python first. If your work is mostly statistics, research or reporting and your colleagues use R, learn R first. Either way, the thinking transfers.

Where Python wins

Where R wins

Learning them

For Python, Python for Data Analysis and Python Data Science Handbook are the standard starting points. Practical Statistics for Data Scientists shows examples in both languages, which is a nice way to compare them side by side.

Do not agonize

Pick one, finish a project, then try the other on the same data. Seeing the same analysis in both languages teaches you more than any comparison article.

Picks that fit this guide

Photos and links go to Amazon. Check the current price, edition and seller there.

Python for Data Analysis, 3rd ed. product photo

Python for Data Analysis, 3rd ed.

By the creator of pandas. The standard guide to cleaning, reshaping and summarizing data in Python.

Check it on Amazon →
Python Data Science Handbook product photo

Python Data Science Handbook

NumPy, pandas, Matplotlib and scikit-learn in one friendly volume.

Check it on Amazon →
R for Data Science, 2nd ed. product photo

R for Data Science, 2nd ed.

Import, tidy, transform and visualize data with R and the tidyverse.

Check it on Amazon →
Practical Statistics for Data Scientists product photo

Practical Statistics for Data Scientists

A compact field guide to the statistics you will use every week.

Check it on Amazon →

Want the full wall of picks, sorted by type? Browse all Top Picks →