I have a data frame with 10 columns of integer. I would like to create new column like this:
df["newcol"] = df[col1]*(11-1)+df["col2"]*(11-2)+..+df[col10]*(11-10)
I've already done the above and it works but I just wonder if there is a pythonic way to do it. Not writing it all down like that because sometime my data frame would have over 100 columns.