Python Forum

Full Version: Syntax error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
I have this Code. I am beginner and I need to run a long code.
But here smth is wrong. Anybody knows where is the mistake?
# importation of the parameters and variables from the exel sheet

window size, year, month, day, minimum, observed values, minimum contract on value, merge month, number of anomalies to report, number of anomalies drop duplicates, duplicates threshold, database file path, policy issue date, amount insured, dateformat = parameters.readParameters(params)

variables = parameters.readVariables(params)

types = parameters.readTypes(params)

treatments = parameters.readTreatment(params)


Error:
File "<ipython-input-73-0ecbfb940dca>", line 2 window size, year, month, day, minimum, observed values, minimum contract on value, merge month, number of anomalies to report, number of anomalies drop duplicates, duplicates threshold, database file path, policy issue date, amount insured, dateformat = parameters.read values(params) ^ SyntaxError: invalid syntax
Thx.
spaces in variable names are not allowed, e.g. window size. you can replace space with underscore instead e.g. window_size
Your comment on line 3 doesn't have a # in front of it.
(Apr-02-2018, 09:15 PM)nilamo Wrote: [ -> ]Your comment on line 3 doesn't have a # in front of it.
I think it's not a comment, but unpacking parameters
(Apr-02-2018, 08:24 PM)buran Wrote: [ -> ]spaces in variable names are not allowed, e.g. window size. you can replace space with underscore instead e.g. window_size

Thanks