Skip to main content

Use this df['Period']=df['Year'].combine_first.combine_first(df['Quarter'])

df['Period'] = df['Year'].combine_first(df['Quarter']) 

Use this df['Period']=df['Year'].combine_first(df['Quarter'])

Use .combine_first.

df['Period'] = df['Year'].combine_first(df['Quarter']) 
Source Link
Abul
  • 195
  • 2
  • 4
  • 15

Use this df['Period']=df['Year'].combine_first(df['Quarter'])