I'm using the data frame plot function to create the following plot: Using the following code:
data.groupby(['age']).agg(np.size)['listener_id'].plot(kind='bar')
How can I save this plot?
The pandas plotting function wraps matplotlib. You can save these using something like
plt.savefig('<filename>.png')
plt.savefig("~/Documents/folder/age.pdf") but it says file does not existfig, ax = plt.subplots() and then pass ax = ax into the pandas plotting command.