Autoregressive Moving Average ARMA with statsmodels
Found the issue and I will post the answer in case anybody will get this issue with ARMA. 

model = sm.tsa.ARMA(endog=dataset_period[col], order=(nlag,0), exog= dataset_period[dummy_variable_period]).fit()
dataset_period['predict_'+str(col[1])+'_'+str(col[2])] = model.predict()
dataset_period['ape_'+str(col[1])+'_'+str(col[2])] = abs(  (dataset_period[col] - dataset_period['predict_'+str(col[1])+'_'+str(col[2])]) / dataset_period[col])
valid_ape = dataset_period['ape_'+str(col[1])+'_'+str(col[2])][dataset_period['ape_'+str(col[1])+'_'+str(col[2])] &lt; 50]



  issue was with the parameters. the model accepted 2 parameters for group_level and I was basically providing 1 so in this case automatically become zero and raise error.
  
  solved with creating a new def and the model will use single column as the parameter for group_level


model = sm.tsa.ARMA(endog=dataset_period[col], order=(nlag,0),exog= dataset_period[dummy_variable_period]).fit()
dataset_period['predict_'+str(col[1])] = model.predict()
dataset_period['ape_'+str(col[1])] = abs((dataset_period[col] - dataset_period['predict_'+str(col[1])]) / dataset_period[col])
valid_ape = dataset_period['ape_'+str(col[1])][dataset_period['ape_'+str(col[1])] &lt; 50]`