This will not work because the pandas.DataFrame.rolling function returns a Window or Rolling sub-classed for the particular operation while pandas.DataFrame.apply Applies function along input axis of DataFrame. As mentioned by ayhan, in this post.
More Related Contents:
- how to calculation cost time [closed]
- Pandas: Adding new column to dataframe which is a copy of the index column
- pandas: filter rows of DataFrame with operator chaining
- Pandas groupby: How to get a union of strings
- How do I create test and train samples from one dataframe with pandas?
- pandas groupby sort within groups
- Applying function with multiple arguments to create a new pandas column
- Python Pandas max value in a group as a new column
- Convert columns to string in Pandas
- append dataframe to excel with pandas
- How to dynamically update a plot in a loop in IPython notebook (within one cell)
- Efficiently replace values from a column to another column Pandas DataFrame
- Why can pandas DataFrames change each other?
- Precision lost while using read_csv in pandas
- Copying MultiIndex dataframes with pd.read_clipboard?
- Convert pandas dataframe from wide to long
- Get list of pandas dataframe columns based on data type
- pandas.read_csv: how to skip comment lines
- Adding a ‘count’ column to the result of a groupby in pandas?
- Pandas: Difference between largest and smallest value within group
- Pandas groupby for zero values
- Plot multiple Y axes
- Select row by max value in group in a pandas dataframe
- pandas groupby where you get the max of one column and the min of another column
- T-test in Pandas
- Pandas sum across columns and divide each cell from that value
- pandas columns correlation with statistical significance
- Can you format pandas integers for display, like `pd.options.display.float_format` for floats?
- computing the mean for python datetime
- Pandas explode multiple columns [duplicate]