your videos are very informative and easily explained. Just a request, please keep adding the dataframe generating codes in the description to follow along with you. Thank you :)
Thank you! If I wanted to do a rolling but exclude the most recent value from the calculation how would I do? Apply a shift to the data frame and then rolling? Thank you
Thanks for your comment, Luca! Exactly! You could slice the dataframe you're creating the rolling average first. If your most recent value is either the first or last value, I'd recommend using iloc. I've covered that here: ruclips.net/video/VIa1ETYnFuc/видео.html Let me know if you have any questions!
@@datagy Thank you for the quick response and the content, I find it really helpful! Back to the original question, I think if I use iloc I would need a for loop, while the rolling function would to it automatically, so if I want a rolling mean of the 5 previous elements for example (not considering the current value) I would do something like df.shift(1).rolling(5).mean() I think... is there a video coming up about shift?
@@LucaSpinello Hi Luca! Sorry, perhaps I misunderstood your original question. Are you looking to just drop the most recent value from your entire dataframe?
@@LucaSpinello In that case, I'd drop the first (or last) rolling average calculation in your dataframe. In that case, I'd recommend iloc to set the value to missing. As your most recent value will sit at either the front or end, it will only be included in a single rolling calculation. It'll accomplish what you're hoping to do with pd.shift, but without as much work.
Good morning, Please, could you tell me how can I use the rolling regression with a granger causality test ? And to do this granger causality month by month? Thanks in advance :)
Hi Nick, I'm from Brazil and I'm following you, you can explain like no one else. Very cool your techniques and methods. Top. Congratulations.
Thanks Claudio! That made my day 😊
you're a lifesaver Nick. Keep going !
Thanks so much, Mogith!
Thank you so much for the tutorial!
your videos are very informative and easily explained. Just a request, please keep adding the dataframe generating codes in the description to follow along with you. Thank you :)
Thanks so much!
Hi Nick. Thank you very much for you explanation. It did help me to understand more about moving average. Keep up the good work.
Thanks so much Kleiton!
Excellent video, super clear
Thank you so much!
Very much useful. Thank you Bro... ❤️.
Thanks Karan!
thank you, very good video :)
Thank you!
dude thank you so much!
I’m glad it was helpful!
Thanks for an amazing explanation
Thanks so much!
Hi Nick. Great video, great explanation!! Thanks :)
Thanks Nadav! I'm glad it was helpful!
thank you, you helped me a lot
Thank you for your comment! I really appreciate it.
Thanks for the video!!
I’m glad you liked it!
clear explanation
Thanks!
hello,
can we use timeperiods as a window?For example the average value of price per hour?
Very good video.
Thanks so much! I’m glad you liked it!
Thank you! If I wanted to do a rolling but exclude the most recent value from the calculation how would I do? Apply a shift to the data frame and then rolling? Thank you
Thanks for your comment, Luca!
Exactly! You could slice the dataframe you're creating the rolling average first. If your most recent value is either the first or last value, I'd recommend using iloc. I've covered that here: ruclips.net/video/VIa1ETYnFuc/видео.html
Let me know if you have any questions!
@@datagy Thank you for the quick response and the content, I find it really helpful!
Back to the original question, I think if I use iloc I would need a for loop, while the rolling function would to it automatically, so if I want a rolling mean of the 5 previous elements for example (not considering the current value) I would do something like df.shift(1).rolling(5).mean() I think...
is there a video coming up about shift?
@@LucaSpinello Hi Luca! Sorry, perhaps I misunderstood your original question. Are you looking to just drop the most recent value from your entire dataframe?
datagy, drop the most recent value only for the purpose of the mean calculation
@@LucaSpinello In that case, I'd drop the first (or last) rolling average calculation in your dataframe.
In that case, I'd recommend iloc to set the value to missing. As your most recent value will sit at either the front or end, it will only be included in a single rolling calculation.
It'll accomplish what you're hoping to do with pd.shift, but without as much work.
What would be the matlab equivalent of "movmean(x,3)" in python?
Good morning,
Please, could you tell me how can I use the rolling regression with a granger causality test ? And to do this granger causality month by month?
Thanks in advance :)
Thank you!
You’re welcome! I hope it was helpful!
thank you for your help
Thanks Sekiro!
Thank you
Thanks for your comment!
Nice explanation bro
Thanks Kamalesh!
how can i change the size of graph?
Hi Renan,
You can use df.plot(figsize=(3,3))
Hope this helps!
@@datagy thanks
How to determine the window size as 5?
Hi Jazz, You can use .rolling(5) or .rolling(window=5)
Hope this helps!
Hello! Can u please help in our code which is completely based on rolling average
And thankyou Nick ! For this video
Hey Meghana, thanks for your comment! What part of your code is causing you trouble?
👏👏
code link?