Some of us are familiar with data manipulation in SQL but not in Python, we tend to switch frequently between SQL and Python in a project, result in reducing our efficiency and productivity. In fact, we can achieve a similar result of SQL in Python using Pandas.

Getting Started

As usual, we would need to install pandas package if we do not have it.

conda install pandas

We will be using the famous titanic dataset from Kaggle in this session.

After installing the package and downloading the data, we need to import them in our Python environment.

We will use pandas dataframe to store the data and use various pandas function to manipulate the dataframe.

#python-pandas #python-programming #programming #sql #data-science

How to rewrite your SQL queries in Python with Pandas
2.45 GEEK