Visualization
Exemplar data: COVID-19 case and death data (date: 202012006)
Bar Chart
Tutorial: pandas.DataFrame.plot.bar
#Bar Chart
#bar_1 = df_state_1.plot.bar()
bar_2 = df_state_1.plot.bar(x='state', y='cases', rot=90, figsize=(20,3))
Line Chart
Tutorial: pandas.DataFrame.plot.line
#Syntax: DataFrame.plot.line(x=None, y=None, **kwds)
line_1 = df_state_1.plot.line(y='deaths',x='state', rot=90, figsize=(10,3))
line_2 = df_state_1.plot.line(subplots=True,x='state', rot=90,figsize=(10,5))
Scatter Plot Chart
Tutorial: pandas.DataFrame.plot.scatter
#Syntax: DataFrame.plot.scatter(x, y, s=None, c=None, **kwargs)
scatter = df_state_1.plot.scatter(x='cases', y='deaths')