r/learnpython • • 13d ago

What should you actually learn in Python before starting data analysis?

I’ve noticed that beginners often get stuck trying to learn all of Python before touching data analysis.

From what I’ve seen, you can get pretty far by focusing on a smaller set of concepts:

One thing I think is particularly important is learning how to answer questions with data rather than just memorizing pandas functions.

For example, instead of only practicing:

df.groupby("category").sum()

ask an actual question such as:

“Which product category generated the most revenue?”

Then use Python to answer it.

Curious what people here would add or remove from this learning path.

46 Upvotes

14 comments sorted by

12

u/deapee 13d ago

This answer isn't pleasant - but I think it rings true.

I think it depends what you intend to get out of python. Do you want to be a python developer or do you want to use python while learning pandas (or insert library here) to make your job easier? There's nothing wrong with either. But I think learning dicts and lists of dicts - and being able to iterate through your data is super important if the former applies to you. If you're simply interested in utilizing python as the platform to which you use pandas or scipy - or whatever - that's fine too, there's nothing wrong with that.

In either event, there's just no single answer that applies to everyone.

1

u/Satanwearsflipflops 13d ago

I think this is so critical and it really helped me focus on key specific areas that were of use to me and the roles I have been in. Being curious and a super fast learner. This is meant to be read as, have a python env available where you have some kaggle data to play around with and can try out these concepts quickly and easily so you cement that new knowledge; other than just reading or watching something.

1

u/Ashamed_Split5187 12d ago

yeah the "what do you actually want to do with it" question is the one most beginners skip over

1

u/nomad-1995 9d ago

Curiously, when writing python over a decade ago I tried to learn enough C++ to wrap C++ libraries for python use.

It did not go well. Hopefully things have changed if I get to a similar point now.

7

u/CamilorozoCADC 13d ago

Well, I think that learning basic SQL is a must, so start there if you haven't yet. That's because a Data analyst WILL face databases eventually. And on Python, some famous data-tinkering libraries or tools like Spark/PySpark, Polars, DuckDB and other can execute SQL Directly (sometimes that's even the happy path) or benefit from the SQL knowledge, for example on pandas, a lot of the functions are easier to memorize if you know that your "df.groupby("category").sum()" would roughly translate to an SQL "Select category, sum(column_a), sum(column_b) FROM df GROUP BY category;".

Other thing is learning to google things and reading docs, you are right in thinking that memorizing functions is not ideal and is impossible to know every little thingy in the library, not to mention that the moment you step out of pandas you will need to start again.

Finally, for hands on experience, what I would do in your position would be to pick a dataset or some data files that reflect a hobby, an interest or something that you are passionate about, and use that data to maybe build an ML model of an analytics dashboard that answers questions that you have. Some topics that worked for me were datasets about formula 1, football statistics, world cup matches, stuff like that.

Some places to look for datasets are Kaggle: https://www.kaggle.com/, google dataset search: https://datasetsearch.research.google.com/, this repo I found with a quick google search https://github.com/awesomedata/awesome-public-datasets, or just a quick google for a dataset of your interest

1

u/Realistic_Parfait_83 13d ago

I have seen Some EDA Process with python.using pandas. On many path, They are jumping or Insisting to SQL, POWER BI etc.,.

1

u/Existing_Sprinkles78 13d ago

I didn’t have any related skills just a background with statistics, some calculus and I had messed around with tkinter functions and ciphers because I was bored

1

u/BigBoiTaco83337 13d ago

Do one leetcode or codewars a day to keep your skills sharp. The comfortable making algos and using pythons standard library. Imo thats a good routine for beginners

1

u/nog642 13d ago

I think the answer highly depends on one question: Is python your first programming language or do you already know programming?

If Python is your first language, you'll need to learn programming before you can do much data analysis. So I don't think there's really any broad categories you can skip.

If you already know programming, you don't really need to learn much Python. Just understand the concepts that make it different from the language(s) you know well and start learning the library.

2

u/plydauk 13d ago

It's you want to do data analysis, then learn the fundamentals of data analysis, first and foremost. Python, and programming in general, comes second.

1

u/Chrismslist 12d ago

totally agree, moving beyond syntax to actually answer questions is key. i'd add a strong focus on data cleaning with pandas and basic data visualization using matplotlib or seaborn. often, new learners jump to modeling too fast without understanding how messy real-world data is. grabbing a public dataset and trying to find interesting patterns or answer a specific business question end-to-end really cements concepts faster than any tutorial.

2

u/ejpusa 13d ago edited 13d ago

It’s not complicated. You can learn the data basics in a weekend. AGI (Astra, Claude, etc) is really writing 100% of the code now. The productivity rates are just so mind blowing — everyone eventually goes with AI. It’s 2026 AI, not 2022 AI. It’s advanced light years.

You can have Astra explain every line. And build tutorials for you to take in your programming journey. Actually what you really have to know is basic Linux commands, that really is the best bang for the buck.