pandas dataframe

A pandas dataframe is useful when we have some non-numerical labels or values in our matrix. It does not require homogeneous data, unlike Numpy. Columns can be named. There are also functions such as melt() and pivot_table() that add convenience in reshaping the table to facilitate analysis and plotting.

To convert a list into a pandas dataframe, we do the following:

import pandas as pd
pd.DataFrame(evens)

You can also convert a numpy array into a pandas dataframe.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset