
上QQ阅读APP看书,第一时间看更新
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.