Closed ghost closed 3 years ago
import pandas import numpy import talib import tulipy
d = {'o': [1,2,8,9,8,5], 'c': [3,8,5,4,3,5]} df = pandas.DataFrame(data=d, dtype=numpy.float64) df['a'] = talib.SMA(df['o'].values,3) print(df)
df['b'] = tulipy.sma(df['o'].values,3) print(df)
talib.SMA works and fills NaN for the first two rows of df['a]
tulipy.sma fails as it omits NaN for the first two rows. ValueError: Length of values (4) does not match length of index (6)
How to get this working? Thanks!
This repo is for the C library.
import pandas import numpy import talib import tulipy
d = {'o': [1,2,8,9,8,5], 'c': [3,8,5,4,3,5]} df = pandas.DataFrame(data=d, dtype=numpy.float64) df['a'] = talib.SMA(df['o'].values,3) print(df)
df['b'] = tulipy.sma(df['o'].values,3) print(df)
talib.SMA works and fills NaN for the first two rows of df['a]
tulipy.sma fails as it omits NaN for the first two rows. ValueError: Length of values (4) does not match length of index (6)
How to get this working? Thanks!