I have a problem with the if statement when I want to add a new column.
import pandas as pd
scan = pd.DataFrame([[1,2,3],['a','b','c']], columns=['st','nd','rd'])
scan['th'] = 0 if scan['st'] == 0 else 1
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
How can I fix this?