I have a pandas data frame and y have 2 columns, A and B. Column A has some null values so I want to create a column C like this, if A have a null value then take the value of B, else take the value of A. I am using this code but it´s not working:
if data['A'] is None: data['C'] = data['B'] else: data['C'] = data['A']