Hadoop MapReduce |(Hadoop MapReduce | SMA in python)
我对Python和MapReduce比较陌生。 我正在尝试使用Python中的Ta-Lib库来计算简单移动平均线(SMA)。 我有这样的数据框:
AA BB 2008-03-05 36.60 36.60 2008-03-04 38.37 38.37 2008-03-03 38.71 38.71 2008-03-02 38.00 38.00 2008-03-01 38.32 38.32 2008-02-29 37.14 37.14
AA和BB是股票代码,显示了6天的价值。
有人可以帮我从这里出去吗 ? 地图应该执行什么以及应该减少哪些输入?最终产出应打印股票A和B的SMA。
I'm relatively new to Python and MapReduce. I'm trying to calculate Simple Moving Average(SMA) using Ta-Lib library in Python. I have a data frame like this:
AA BB 2008-03-05 36.60 36.60 2008-03-04 38.37 38.37 2008-03-03 38.71 38.71 2008-03-02 38.00 38.00 2008-03-01 38.32 38.32 2008-02-29 37.14 37.14
AA and BB are the stock symbols and their values for 6 days are shown.
Can anyone help me out here ? What should be the map perform and what input should Reduce get ?The final output should print the SMAs for the stocks A and B.
原文:https://stackoverflow.com/questions/33994829
更新时间:2022-05-05 15:05