Display a dataframe of purpose and the total money spent for that particular purpose and plot a bar graph for the same I am given a dataframe with the "purpose" and "money spent" columns I need to plot a bar graph for the new dataframe with total money spent. I have created a new df with the following code but not able to plot the graph with it:
udp1=pd.DataFrame(udp.groupby("PURPOSE")["MONEYSPENT"].sum())
udp1()
