Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how plot graph by using group by function in python

# plot data
fig, ax = plt.subplots(figsize=(15,7))
# use unstack()
data.groupby(['date','type']).count()['amount'].unstack().plot(ax=ax)
Source by scentellegher.github.io #
 
PREVIOUS NEXT
Tagged: #plot #graph #group #function #python
ADD COMMENT
Topic
Name
1+6 =