Backgrounds

Dataframe is used in R to save and load data. The data saved in a daraframe can be indexed for multiple steps required in analysis.
It is natively supported in R.

However, in python, dataframe is not natively supported. The python package called 'pandas' can be used to create and store data in python similar to how we do in R.
First of all, to download and install the package, run the following command in your cmd or terminals:
python -m pip install pandas

Import required python library

import pandas as pd

To create an empty dataframe using pandas, following code can be used.

df = pd.DataFrame()

We can also add index and columns in the empty dataframe.

df = pd.DataFrame(index=range(5), columns=['A', 'B', 'C', 'D'])

df

A B C D
0 NaN NaN NaN NaN
1 NaN NaN NaN NaN
2 NaN NaN NaN NaN
3 NaN NaN NaN NaN
4 NaN NaN NaN NaN