Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

Time Series pooling up

$
0
0

@ASHISH_17 wrote:

I want to pool the data year wise.
By using the below code I am able to pool the data month or daywise, but unable to pool for year wise. As I want to see the trend year wise.

train[‘mm_pickup’]=train.pickup_datetime.dt.month.astype(np.int8)

plt.figure(figsize=(12,2))
month_wise=train.groupby(‘mm_pickup’).agg({‘id’:‘count’}).reset_index()
sns.barplot(x=‘mm_pickup’,y=‘id’,data=month_wise)
plt.xlabel(‘Month wise pick up’)
plt.ylabel(‘no of counts’)
plt.xticks(range(0,7),mm_names[:6])
plt.title(‘Monthly pick up’)
pass

I want the plot to be a line plot so the trend is cleaely visible.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles