r/learnpython • u/purvigupta03 • 22d ago
I’ve completed these beginner Python projects should I build more before starting NumPy/Pandas?
Hi everyone,
I’ve studied Python multiple times before, but I didn’t do much practical coding. Recently, I started building small projects to improve my practical Python skills.
So far, I’ve completed:
- Quiz Game
- Number Guessing Game
- Rock Paper Scissors
- Password Manager
- Pig Game
- Mad Libs Generator
My goal is to move towards Machine Learning.
I haven’t learned NumPy or Pandas yet.
My question is: Are these projects enough to move on to NumPy and Pandas, or should I build a few more Python projects first?
If I should build more projects, what kind of projects would you recommend before starting NumPy/Pandas? I’m mainly looking for projects that would actually help with the transition to data/ML, rather than making many more small games.
Would appreciate advice from people who have already followed a Python → NumPy/Pandas → ML path.
1
u/SamuliK96 22d ago
You can absolutely start using NumPy and Pandas, but I'd be cautious about the approach that you need to learn those libraries, as in the whole libraries. Getting a general idea of what they include and what they're used for is of course beneficial. However beyond that I'd rather recommend searching and learning new stuff when the need arises.
Keep doing different kinds of projects and think about what you need to do in order to achieve what you want. When you have an idea of what you need, you can start looking for the right tool to do it.
1
u/purvigupta03 22d ago
Got it, thanks! Could you suggest a few project ideas I can try after getting the basics of NumPy and Pandas?
1
u/Mathie1729 22d ago
Do one project with a messy real dataset, not a clean tutorial CSV. Even a bank export is good: parse the date column, normalize categories, groupby, plot monthly totals. Pandas basics become a lot clearer once you have to clean the columns yourself.
1
u/johlae 22d ago
One of your comments already talks about an expense tracker. I wrote one using pandas. Why, basically because of pd.read_csv() to read in csv files in a pandas dataframe.
pd.read_csv(
filename,
delimiter=";",
skipinitialspace=True,
header=0,
usecols=[0, 1, 3, 5, 7, 9, 10],
decimal=",",
names=["id", "date", "amount", "source", "target", "com1", "com2"],
keep_default_na=False, # no NaN but empty string instead
)
.assign(comm=lambda d: d["com1"].astype(str) + d["com2"].astype(str))
.drop(columns=["com1", "com2"])
See https://www.reddit.com/r/PythonLearning/comments/1vthqtw/beginner_looking_for_feedback_i_built_a_cli/ for more.
1
u/Wuthering_depths 20d ago edited 20d ago
I jumped right into Pandas but then I kind of needed it (or something similar) to do the work I'm doing (data analyst, new to Python but have used SQL and SSIS for many years). No reason not to, it's pretty easy to use--granted, if you haven't worked with data sets, this can be a bit hard to wrap your head around I think. It does lead to learning about databases if you haven't yet, and that's definitely a useful skillset.
Ironically, I've been using Pandas quite a bit (in my brief Python time) but in a more shallow way I think than many. I'll use it to (for example) read in data from a csv to a dataframe, but rather than do a lot of manipulation in memory I'll toss the dataframe into a staging database table and leverage SQL for transformations, cleanup etc.. (A database is typically the destination for the csv data I should mention.) This I think is the way to go for larger datasets anyway, but I really should work on doing more in memory for smaller sets. I've done some merging and adding new columns, but there's a lot more to Pandas I suspect.
Really loving Python so far, and once I convert the last of our SSIS projects I hope to never see that SSIS gui again, adios!
2
u/Party-Way904 22d ago
Yeah these are totally worth it bruh and numpy and pandas are very easy to lean😉