Answers for "Python Pandas: Create new column out of other columns where value is not null"

0

Python Pandas: Create new column out of other columns where value is not null

df['AZ'] = df.loc[:,'A':'Z'].fillna(method='ffill',axis=1)['Z']
Posted by: Guest on April-14-2022

Code answers related to "Python Pandas: Create new column out of other columns where value is not null"

Python Answers by Framework

Browse Popular Code Answers by Language