I have a portion of code that's tested fine in Jupyter but fails running as a script.
In Jupyter:
#Recombine split values into new field used to group for csv output and filename string
df['CSV_ID']=[f"{a}.{b}@{c}" for a,b,c in zip(df.Param,df.Label,df.ID)]
df.head(1)
But when I run it in a .py script I get invalid syntax error:
df['CSV_ID']=[f"{a}.{b}@{c}" for a,b,c in zip(df.Param,df.Label,df.ID)]
^
SyntaxError: invalid syntax
I've tried erasing and rewriting in IDLE but it doesn' t work