Monthly,Yearly,Quarterly Purchase value

Notebook File:

ভ্যালু M থেকে y বা q লিখে আমরা বাৎসরিক এবং কোয়ার্টার হিসাব বের করতে পারি

# Resample the data by month
monthly_data = df.resample('M').sum()

# Calculate the average monthly sales
monthly_avg = df.resample('M').mean()

# Resample the data by quarter
quarterly_data = df.resample('Q').sum()

# Resample the data by year
yearly_data = df.resample('Y').sum()

Last updated