answer1 = pd.unique(calls[calls['CVLEGEND'] == 'LARCENY']['OFFENSE']).tolist()
python to list
.tolist()
pd.unique()
Pandas Visualization
Pandas offers basic functionality for plotting. For example, the DataFrame
and Series
classes both have a plot
method.
As you learn to do data visualization, you may find the pandas plotting documentation helpful!
As an example of the built-in plotting functionality of pandas, the following example uses plot
method of the Series
class to generate a barh
plot type to visually display th