A Guide to Pandas and Matplotlib for Data Exploration

A Guide to Pandas and Matplotlib for Data Exploration

6 years ago
Anonymous $hM_jrxqbr-

https://towardsdatascience.com/a-guide-to-pandas-and-matplotlib-for-data-exploration-56fad95f951c

import matplotlib.pyplot as pltimport pandas as pdimport numpy as np%matplotlib inlinecar_data = pd.read_csv('inbox/CarData-E-class-Tue Jul 03 2018.csv')Inline indicates to present graphs as cell output, read_csv returns a DataFrame, the file path is relative to that of your notebook.

Often when dealing with a large number of features it is nice to see the first row, or the names of all the columns, using the columns property and head(nRows) function. However if we are interested in the types of values for a categorical such as the modelLine, we can access the column using the square bracket syntax and useĀ .unique() to inspect the options.

Last Seen
16 minutes ago
Reputation
0
Spam
0.000
Last Seen
19 minutes ago
Reputation
0
Spam
0.000
Last Seen
about an hour ago
Reputation
0
Spam
0.000
Last Seen
about an hour ago
Reputation
0
Spam
0.000
Last Seen
2 hours ago
Reputation
0
Spam
0.000
Last Seen
5 hours ago
Reputation
0
Spam
0.000