1import btalib #need to instal bta-lib, pip install bta-lib
2smma=btalib.smma(df['close'],period=4)
3wma=btalib.wma(df['close'],period=70) # wma or smma values will start after "period" values
4#from 0 till the period value there would Nan values
5df['WMA']=wma.df #wma.df is a reserved word not a name of dataframe
6df['SMMA']=smma.df#same as step 3