Imputation problem: ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all() [duplicate]
This question already has answers here: Truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all() (15 answers) How do I create a new column where the values are selected based on an existing column? (15 answers) Closed yesterday. I have defined a function: def convert(x): if [(x != float(0)) & […]