Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

group a dataset

#DataFrame.groupby() method
e.g
day.groupby('month')

e.g2

day['month'] = day['date_time'].dt.month
by_month = day.groupby('month').mean()
by_month['traffic_volume']
Source by app.dataquest.io #
 
PREVIOUS NEXT
Tagged: #group #dataset
ADD COMMENT
Topic
Name
8+2 =