Home>
I want to calculate EMA (exponential smoothing moving average) using pandas and NumPy of Python3.
I would like to derive the 14day EMA of the high, low, and closing prices from the cryptowatch API and dividing them by 3, ie (high + low + closing price)/3. It won't be what I expected ...
How can I change the code?
The numbers will come out ...
print ("ema:% s"% get_ema ())
The result that came out is this ↓. It's not a number I want to ask for, and it's also a mystery why data is in 1.
esa: 1 6713.39881
Applicable source code
`` `
Tried I tried adding.values [0] etc., but it didn't work with the following error ...
'numpy.float64'object has no attribute'ewm'numpy

Answer # 1
Related articles
 python  i want to plot the results of a complex matrix calculation
 about python numpy calculation
 python  about float type calculation problem (easy and sorry)
 python  the result is different from the expected calculation result
 python opencv mean square error calculation
 python  i want to make a game that pushes a moving button with tkinter, but thread does not work well
 calculation method by python groupby
 [python] i am in trouble because the calculation result of the scipy special function is nan
 python 3x  efficiency of calculation becomes complicated
 python  center of gravity calculation for multiple figures
 i want to do a calculation using the python range function
 calculation of trigonometric functions (npcos,npsin) in python numpy
 python 3x  i want to standardize the calculation process of columns obtained from database
 python  django integerfield and int type calculation
 python  data average and standard deviation calculation for each column of multiple csv files
 python  i want to give a delay between pressing a key and moving a figure
Related questions
 i want to read python time series data while shifting by 1 day
 python  how to deal with error when converting pandas datetime type
 python csv even odd sorting method
 replace even and odd numbers with symbols python
 i want to process sql data in python and create a graph (i made it, but it is heavy)
 python  i want to put a specific value in column c up to the top n values in column b when column a meets a specific conditio
 python even number sorts odd numbers
 python  is it possible to combine duplicate index and columns in pandas and add the numbers in them?
 python  how to conditionally create a new dataframe from a dataframe
 python  modelpredict() cannot be executed in tensorflow
I'm sorry. It was solved. The code itself was not wrong.
Here
I was able to understand when I looked at the relationship of data.