I like to fill the null values in a column with a formel based on other columns:
data['datacqtr'].fillna(data['datadate'].dt.year.apply(str) + str('Q')+data['datadate'].dt.quarter.astype(str))
Can you see where the problem is with my Code? Because there are some nulll values after this code.
My Dataframe:
datadate | datacqtr 2002-02-28|2002Q1
Dataacqtr stands for the Quarter. And sometimes I have datadate but no datacqtr (Quarter). So I like to fill up the colmn datacqtr based on the colmn datadate.