Created
September 26, 2020 09:15
-
-
Save yuyasugano/0ce83f65d9f6a77ab1490ed6ac39e414 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, center=True).sum()) | |
num | |
0 NaN | |
1 3.0 | |
2 6.0 | |
3 9.0 | |
4 12.0 | |
5 15.0 | |
6 18.0 | |
7 21.0 | |
8 24.0 | |
9 NaN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment