r/learnpython • • Nov 28 '20

Data analysis for beginners

Hi all,

What would you recommend as the best route to start learning towards data analysis with Python (I will add that I'm not planning on becoming data analyst/scientist within few months or so - I started learning Python 4 months ago, got the basics, not interested in building websites, creating games, but I would like to explore data; I also already started learning SQL 2 months ago. Really taking it easy and want to see where it all leads to, but extremely happy that I'm learning new skill).

Should I start with Matplotlib? Or Numpy? Or Pandas?

Any other tips or recommendations?

Thank you for your answers in advance!

330 Upvotes

35 comments sorted by

View all comments

3

u/pugwala Nov 29 '20

Data analysis begins with data cleansing, and data cleansing is the daily grind for most data scientists. “Garbage in, garbage out” as it is said, is the first rule. 100% of the data cleansing tutorials and walkthroughs that I have found through Google, Medium/Towards Data Science, StackOverflow, and YouTube were never sufficient for my data cleansing needs. Most tutorials start with highly curated datasets/sources to begin with and then go from there. Develop your own data cleansing pipeline and use it with all your needs. Issues to consider:

  • bias hard baked into the datasets (are they biased to a desirable outcome?)

  • sparsely filled data/records (to impute or not impute, convert NaNs, drop/ignore - all of which adds additional bias to your data and results)

  • multiple language support (commonly on the same webpage)

  • markup & script languages

  • email addresses & hyperlinks

  • numbers, conversions, dates, timeframes & varying data types

  • text processing issues: anagrams, stopwords, capitalization, domain specific terms, uni/bi/trigrams

  • categorical features

  • scaling

And so much more. Create your own data cleansing pipeline and get to really know your own data.

Become familiar with Pandas, but don’t build your processing pipelines around it. Pandas can be frustratingly inconsistent in methods and functions. Keep in mind that one way to think about Pandas is that it is a container of arrays, and as such may be evaluated in lots of very familiar and consistent ways.

RandomForest is your friend. I always say “no data scientist gets fired for using RandomForest”. This is a global truth. There are a lot of algorithms and models that a far superior, and some data scientists will poo-poo its use, but I always respond saying “it’s computationally efficient and reliably verifies which insights are valuable with almost zero effort”. Your director, or cost center owner, will love you.

Scikit-Learn is a great API toolkit to build upon. Yes, many of the algorithms are a bit dated and newer boutique versions provide better results. It it gets you a long way down the road of good, better, best.

Lastly, remember that 12 data scientists in a room will have 12 different opinions of why there approach is superior. Unless you are in academia, don’t let perfection get in the way of good.

I hope this helps.