Nov-16-2021, 10:52 PM
Sounds like a case for pandas.apply()
Basically, you create a function that will determine the value to be assigned. This allows you to have lots of complicated expressions involved, and then the function returns the value to be placed in the new column.
See https://pandas.pydata.org/docs/reference...apply.html
Basically, you create a function that will determine the value to be assigned. This allows you to have lots of complicated expressions involved, and then the function returns the value to be placed in the new column.
See https://pandas.pydata.org/docs/reference...apply.html