Have a function to assign a hex color variable based on a scale from 0-1.
In one column I have pageviews that are being assigned a scale:
df1['pvScale'] = df1['GA Page Views']/max(df1['GA Page Views'])
But when I go to create another column and have that be based off a function for assigning hex values:
df1['hex'] = colorscale("#00ff4c", df1['pvScale']) #(orginal hex, 0-1)
Getting this return:
"ValueError: The truth value of a Series is ambiguous."
What's the correct syntax to perform this operation?