Python + Pandas Tutorial – (Pt.5) Rolling Filter




[ad_1]

In this video we continue working with the data frame and show how to smooth our timeseries data using the rolling filter.
We’ll cover some of the basics and look at different window types.

Discord Server: https://discordapp.com/invite/Zf8CSB3
Github: https://github.com/markjay4k/Pandas-Tutorial/blob/master/Pandas%20Rolling%20filter%20with%20Kaggle%20stock%20data.ipynb
Kaggle S and P 500 stock data: https://www.kaggle.com/sdksci/s-p-500-plotting-with-detailed-notes-for-novices/data

Source


[ad_2]

Comment List

  • Mark Jay
    January 23, 2021

    Thanks dude😀

  • Mark Jay
    January 23, 2021

    Thank you for the explanation, it helps.

  • Mark Jay
    January 23, 2021

    Hi Mark, tks !

  • Mark Jay
    January 23, 2021

    how to project next day record with rolling window (python)

  • Mark Jay
    January 23, 2021

    7:38 gives error

  • Mark Jay
    January 23, 2021

    df_aapl.close.rolling(win_len).mean() is what worked for me.

  • Mark Jay
    January 23, 2021

    How do you comment more than one line in Jupyter?

  • Mark Jay
    January 23, 2021

    Where are the rolling pandas

  • Mark Jay
    January 23, 2021

    Hey, thanks a lot for your tutorial videos, very helpful!
    I have a question if you don't mind. I want to pull out something like this:
    a = df.index – df.index.where(df.candle == df.candle -3)[0]

    df['test'] = df.bid.rolling(int(a)).mean()
    So basically, I want to look back X amount of periods with .rolling(), but I don't know exactly how many therefore I need to calculate it based on df.candle values. I want to look 3 candles back to be more precise and calculate the index difference to use inside .rolling(). I though something like the above piece of code would work, but no, it's giving me errors…

  • Mark Jay
    January 23, 2021

    I think something has changed in stock data at Kaggle. I got problem using .mean(), jupyter claims it cannot handle object dtype which is used in column 'Name'. It's obvious, that it is impossible to get .mean() from strings, but it works for you in 7:50, what the heck?

  • Mark Jay
    January 23, 2021

    Nice video. To enable %matplotlib nbagg. It should be before import of matplotlib

  • Mark Jay
    January 23, 2021

    How do I plot a certain period from a data set. ( like Jan-Feb) in a full year's data

Write a comment