List Comprehension is a handy and faster way to create lists in Python in just a single line of code. It helps us write easy to read for loops in a single line. In Python, dictionary is a data structure to store data such that each element of the stored data is associated with a […]
Python
How to Load a Massive File as small chunks in Pandas?
The longer you work in data science, the higher the chance that you might have to work with a really big file with thousands or millions of lines. Trying to load all the data at once in memory will not work as you will end up using all of your RAM and crash your computer. […]
How To Read a CSV File as Pandas Data Frame?
Pandas is one of the popular Python package for manipulating data frames. Pandas is built on top of NumPy and thus it makes data manipulation fast and easy. One of the most common things one might do in data science/data analysis is to load or read in csv file. Here we see 7 examples to […]
How to Use Lambda Functions in Python?
Python lets you create a function on the go, but without really assigning a name to the function. These “anonymous” functions are called “Lambda Functions”. One typically writes a lambda function on the fly, when one wants to write a function for one-time use. Lambda Functions come handy in a variety of situations and are […]
12 Basic Commands with NumPy Array
NumPy (pronounced as Num-pee or Num-pai) is one of the important python packages (other being SciPy) for scientific computing. NumPy offers fast and flexible data structures for multi-dimensional arrays and matrices with numerous mathematical functions/operations associated with it. Core data structure in NumPy is “ndarray”, short for n-dimesional array for storing numeric values. Let us […]