Data Preparation & Wrangling with Python & Pandas

How to use Python and Pandas in Data Science and Engineering

Christianlauer
CodeX

--

For processing, or more precisely data wrangling, the combination of Python and Pandas is a perfect toolset. Here are the most important functions for your next project.

Importing Data

Before we process the data, let’s load it first, in this example from a CSV — here you can find more possibilities to connect different source systems.

import pandas as pd
data=pd.read_csv(‘yourfilename.csv’, header=None, nrows=5)

Look into the Data

To get a first idea about the data and to find possible errors you can use head()

data.head(6)
Using head — Image by Author

or to get even more details you can use describe().

data.describe()

The describe() function is used to generate descriptive statistics of the data in a Pandas DataFrame or series.

--

--

Christianlauer
CodeX

Big Data Enthusiast based in Hamburg and Kiel. Thankful if you would support my writing via: https://christianlauer90.medium.com/membership