Skip to main content

#Df0 personne en discute

Hi I have the following script which is giving an error

"An error occurred while communicating with the Analytics Extension.

Error processing script

SyntaxError : invalid syntax (<string>, line 18)

 

Analytics extension script is invalid"

 

Although my code seems correct , and i am using this in tableau web , not in a desktop

___________________________________________________________

SCRIPT_REAL("

 

import pandas as pd

 

from statsmodel.tsa.holtwinters import ExponentialSmoothing

 

 

 

⌗df= pd.Series(_arg1)

 

 

 

⌗Fit Holtwinters model (you can tweak trend/seasonal as needed)

 

 

 

model=ExponentialSmoothing(df,trend='add', seasonal=None).fit()

 

 

 

⌗Forecast the same number of points as inputs

 

 

 

forecast = model.forecast(3)

 

 

 

⌗Return the forecasted values

 

 

 

retun forecast.tolist()

 

",

 

SUM([Score])

 

)

2 réponses
  1. 9 juil. 2025, 14:32

    @Manish-B Mukherjee​ 

    Hi, why are you commenting this line:

    #df= pd.Series(_arg1)

    I think it should be:

    df= pd.Series(_arg1)

    If this post resolves the question, would you be so kind to "Select as Best"?. This will help other users find the same answer/resolution and help community keep track of answered questions. Thank you.

     

    Regards,

     

    Diego Martinez

    Tableau Visionary and Forums Ambassador

0/9000