Created
November 29, 2021 23:19
-
-
Save alphazwest/eab297302e1fa0708d5e2e2312045dd5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Add a simple moving average | |
ETH["adr"] = ETH['dr'].rolling(window=20).mean() | |
# View result | |
High Low dr adr | |
Date | |
2021-05-18 3562.465088 3246.404053 316.061035 NaN | |
2021-05-19 3437.935791 1952.460205 1485.475586 NaN | |
2021-05-20 2993.145264 2170.229004 822.916260 NaN | |
2021-05-21 2938.205078 2113.347168 824.857910 NaN | |
2021-05-22 2483.983154 2168.124268 315.858887 NaN | |
... ... ... ... ... | |
2021-11-14 4689.842773 4516.935547 172.907227 217.784058 | |
2021-11-15 4764.636230 4546.599121 218.037109 219.570532 | |
2021-11-16 4891.704590 4144.334961 747.369629 238.494238 | |
2021-11-17 4300.306641 4107.125977 193.180664 228.781030 | |
2021-11-18 4343.557129 4052.962158 290.594971 234.109387 | |
[185 rows x 4 columns] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment