1. Identifying Monthly Average Sales #Resmaple Data on MOnthly basis df.resample('M',,on='Date').sum() 2. Identify Change in sales over time #(using shift method) df["Previous Sales"] = df["Sales"].shift(1) # Vales of sales are shifted by 1 position. Now we need to derive Change in sales. We can subtract sales. df["Change in Sales"] = df["Sales"] - df["Previous Sales"]
To download the data file used in this video.... Checkout the below link:
houseoftechconcepts.com/pages/pythonprojectStudyMaterial.html
Very good tutorial. Explanation is clear and delivered with a good pace and examples. Thank you!
Thanks for your kind words .. Keep supporting the channel !!
1. Identifying Monthly Average Sales
#Resmaple Data on MOnthly basis
df.resample('M',,on='Date').sum()
2. Identify Change in sales over time
#(using shift method)
df["Previous Sales"] = df["Sales"].shift(1)
# Vales of sales are shifted by 1 position. Now we need to derive Change in sales. We can subtract sales.
df["Change in Sales"] = df["Sales"] - df["Previous Sales"]