trying to create a new column on a cudf dataframe based on VWMA from ta_py :
#creating df
CJ_m30 = cudf.read_csv("/media/f333a/Data/CJ_m30.csv",
names = ["DateTime","Bid","Ask","Open", "High", "Low", "Close"])
#trying to create new column based on func
import ta_py as ta
length = 40
def process_vwma(data):
VWMA = ta.vwma(data,length)
return VWMA
CJ_m30['VWMA'] = CJ_m30['Close'].apply(process_vwma, axis = 0)
returns error :
ValueError: UDFs using *args or **kwargs are not yet supported.
updated: now error is :
TypingError: Failed in cuda mode pipeline (step: nopython frontend) Failed in cuda mode pipeline (step: nopython frontend) Unknown attribute 'vwma' of type Module(<module 'ta_py' from '/home/f320x/anaconda3/envs/rapids-22.02/lib/python3.9/site-packages/ta_py/init.py'>)
File "../../../../../tmp/ipykernel_3478/1395824149.py", line 6:
During: typing of get attribute at /tmp/ipykernel_3478/1395824149.py (6)
File "../../../../../tmp/ipykernel_3478/1395824149.py", line 6:
During: resolving callee type: type(<numba.cuda.compiler.Dispatcher object at 0x7f05b67a47c0>) During: typing of call at /home/f320x/anaconda3/envs/rapids-22.02/lib/python3.9/site-packages/cudf/core/series.py (2495)
File "../../../anaconda3/envs/rapids-22.02/lib/python3.9/site-packages/cudf/core/series.py", line 2495: >>> def f(x):
return df.apply(lambda row: f_(row[name])) ^
Can someone give an explanation ? Thank you