concept Pandas in category data

appears as: Pdas, Pdas
Data Science Bookcamp: Five Python Projects

This is an excerpt from Manning's book Data Science Bookcamp: Five Python Projects.

Our dictionary representation is functional, but is also difficult to use. A better solution is required. That solution is provided by the external Pandas library. Pandas is very useful tool for manipulating numeric tables in Python.

We’ll now load our fish_measures tables into Pandas. This can be done by calling pd.DataFrame(fish_measures). The method-call will construct a Pandas DataFrame object. The term data frame is just a common synonym for table that arises in statistical software jargon. Basically, the DataFrame object will convert our dictionary into a 2-dimensional table. According to convention, Pandas DataFrame objects are assigned to a variable df. Below, we will execute df = pd.DataFrame(fish_measures). Afterwards, we’ll print out the contents of df.

Listing 8.4. Loading a table into Pandas
df = pd.DataFrame(fish_measures)
print(df)