Python libraries are what makes Python so awesome. Today I'll talk about my five most useful Python
libraries for data science. I'm Samanvay, a data scientist living in Sydney Australia.
I've been coding in Python for more than six years and during that time I've used tons of
Python libraries to make my job as a data scientist easier. Today I won't talk about
the most obvious packages for data science out there like Numpy, Pandas, Matplotlib,
Tensorflow, Pytorch or Scikit-Learn. These are pretty obvious packages that everyone uses
as a data scientist or a machine learning engineer and we all know how useful they are. Instead,
I'll cover a little bit more niche packages that you might not have heard of that make your life
as a data scientist easier. Let's start off with a personal favourite TQDM. TQDM is a very simple
library. It is a progress bar for your processes in Python and it's an absolute game-changer. As a
data scientist, there'll be many occasions where you'll need to run lots of processes over a long
period of time. An example of this process could be implementing a fix to millions of rows of data
in a database and then executing a batch insert to updating those rows after some transformations
or some calculations. Processes like this can take hours to complete you need to be well aware of how
long it's going to take and the progress of the process so that you can plan your work accordingly
and sometimes this can be time-sensitive fixes. One way to track the process would be simply to
put in a couple of "print" statements inside your loops but this is a faulty way of doing it for so
many reasons. One of them is that it can easily clog up your terminal files or it means creating
an extensive log file which you'll have to spend a couple of minutes digging through. So TQDM is
the simple solution to all of these problems. Not only will it show you the progress of your task
it'll also show you how long it's taken as well as how long it's expected to take. So this is perfect
for your process monitoring and management. Best of all it fits in very nicely when you're using
data frames. Next on my list is Seaborn. So you must have heard of Matpotlib which I mentioned
earlier so this is the default and the most commonly used charting library available in
Python. It's very quick to get started with but there's a lot of customizations you need
to do to make it look good and I've never been a big fan of Matplotlib when it comes to creating
beautiful visualizations and that was until I discovered Seaborn. So Seaborn is an extension
of Matplotlib but with better visualization tools and better statistical plotting tools so
right out the gate seaborne charts look beautiful and amazingly aesthetic and additionally seaborne
works really well with data frames. To the point that a lot of the charting functions they allow
you to insert a data frame right into the function as well as the column names where to extract data
from and just like that it works seamlessly. So I couldn't recommend Seaborn highly enough. The
next useful package I use is pytest. As a Python developer writing production code means writing
tests for that code. These tests are designed to verify code functionality and make sure that it
doesn't break the rest of the code base for your other users. The default library for testing is
unit tests, whilst there's nothing wrong with unit tests, I found it a lot quicker and easier to get
started with pytest. There's less boilerplate required and the failure messages to me
seem a lot better than unit tests which makes debugging your code a lot easier. Right out the
gate pytest gives you a better user experience and a better functionality. Next on the list
is Pillow. So, Pillow is an updated version of the Python Imaging Library. It's an incredibly
useful package to be dealing with images, you can use it for reading and writing images,
cropping and rotating images as well as turning them into grayscale. So OpenCV is another tool
that you might use for image processing and that's also been pretty good in my experience. Finally,
the last library I use is the Request Library. Some of the more seasoned Python developers
must be already familiar with the Request Library because it's commonly used for lots of web crawler
applications such as scraping websites. But in data landscape I use Request Library to make
HTTP calls to a variety of APIs so when you're working in a large team in the company you'll
be interfacing with APIs and other services from other teams to get the data you need to get your
job done and Request is the perfect library to be interfacing with those APIs in a lot of the cases
you'll also be downloading data from third-party APIs. There isn't that much boilerplate required
to get going, it just works out of the box so that's it for my top five most useful libraries
in Data Science. If you enjoyed the video then smash the like button I'll see you next time.