Optimizing Memory in Python : Understanding Garbage Collection

How do you free unwanted memory in python ? Often, our programs run out of memory when we are trying to build models. How can we free some of the unwanted memory to get our programs running again? This video talks about ways to free unwanted memory in python. The video briefly explores garbage collection…

How to use Cython to speed up python code ?

Python is compiled into bytecode (pyc file) and then interpreted- making it slower than languages such as C/C++ that are directly compiled. Cython is a tool to write compiled C extension for python to speed up code. Cython is easy to use and often leads to significant improvement in runtime. In this article, lets walk…

What are some ways to make Pandas code faster?

Pandas is super popular for data science tasks. But code written in pandas can often be slow. This article talks about how one can make pandas code faster. We will walk through a super simple task of adding 1 to every element in the first column of a dataframe and see how different ways of…

Differences between Pandas and NumPy

Pandas and NumPy are two of the most popular python libraries used for data science applications. What is Numpy? Numpy is a popular library used for scientfic computing. It has support for multidimensional arrays and mathematical functions that can operate on these arrays. NumPy arrays are homogeneously typed – which means they hold elements of…