EN VI

Learn Python for Data Analysis: A 30-Day Beginner Plan

By ··8 min read

Short answer

To learn Python for data analysis in 30 days, work in four blocks. Days 1 to 7 cover basic Python, days 8 to 14 cover reading and filtering tables with pandas, days 15 to 21 cover grouping, merging and cleaning, and days 22 to 30 are for one small project. Write every example yourself, and check each result against a number you can verify by hand.

Most people who quit Python quit in the first two weeks. They start with a long list of topics, and they never reach a result they can use. On a plan with no checkpoints, a beginner cannot tell whether three days of effort moved them forward. To avoid this, we split 30 days into four blocks. Each block ends with something you can run and check. The plan assumes about an hour a day and a free notebook tool, so no installation is needed.

The four blocks at a glance

DaysYou writeDone when
1 to 7Variables, lists, dictionaries, loops, functionsYou can write a function that returns the average of a list
8 to 14Read a CSV, inspect it and filter rows with pandasYou can list the paid orders and count them
15 to 21Group, merge and cleanYou can explain why a merge changed the row count
22 to 30One project from question to explained resultA teammate can read your notebook and follow it

Days 1 to 7: learn the five tools you will use daily

We start with plain Python, because pandas errors are hard to read without it. A recipe works the same way, since knife skills come before the menu. The five tools are variables, lists, dictionaries, loops and functions. Type the example below, then change the numbers and predict the output before you run it.

def average(values):
    return sum(values) / len(values)

order = {"order_id": 1001, "customer": "Ruby Hoang", "total_amount": 15000000}

print(order["customer"])                                  # Ruby Hoang
print(average([15000000, 8000000, 12000000, 20000000]))   # 13750000.0

Skipping this block saves a week at first. It also means that every later error looks the same, so we do not recommend it.

Days 8 to 14: start pandas with one real file

Now that we can write small functions, we move to tables. Pick one CSV with at least a few hundred rows, for example an export from your own work. Read it, print its shape, look at the first rows and filter by one condition. The details are in pandas Basics: Read, Filter and Group Data in Python. Before each step, write down how many rows you expect.

Days 15 to 21: group, merge and clean

This block is where results start to go wrong without any error message. A merge can repeat rows, and a missing value can drop out of a total. For that reason, we compare row counts and totals after every step. If you already know SQL, groupby and merge map onto GROUP BY and JOIN, and the same checks apply.

Days 22 to 30: one small project

Choose one business question and answer it with a few hundred rows of data, then write the answer in three sentences. A project of this size is enough to show how you check your work, and it gives you something to show an employer.

How to know you are ready

  • You can explain every line of your own notebook to someone else.
  • You predict the row count before a filter or a merge, and you are right most of the time.
  • You can find the cause when two totals disagree.

Frequently asked questions

How long does it take to learn Python for data analysis?

With about an hour a day, most beginners can read, filter and group a table with pandas in three to four weeks. Trusting your own results takes longer.

Should I learn Python or SQL first?

Learn the one your target job uses every day. If your data sits in a database, start with SQL. If it arrives as files, start with Python.

Do I need to know math to learn Python for data analysis?

Basic arithmetic, averages and percentages are enough to start. Statistics becomes useful later, when you test whether a difference is real.

References

Keep learning, step by step.

Each lesson in Learn has a business context, a runnable example and a result check, so you practise this habit on real questions.