Created
September 26, 2020 09:50
-
-
Save yuyasugano/9520f17a560d79062aa870fffdb07ec7 to your computer and use it in GitHub Desktop.
Pandas DataFrame tips
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print(df.rolling(3, win_type='triang').sum()) | |
num | |
0 NaN | |
1 NaN | |
2 2.0 | |
3 4.0 | |
4 6.0 | |
5 8.0 | |
6 10.0 | |
7 12.0 | |
8 14.0 | |
9 16.0 | |
print(df.rolling(3, win_type='exponential').sum(tau=1)) | |
num | |
0 NaN | |
1 NaN | |
2 1.735759 | |
3 3.471518 | |
4 5.207277 | |
5 6.943036 | |
6 8.678794 | |
7 10.414553 | |
8 12.150312 | |
9 13.886071 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment