Conduct the calculation only when the value is not null
I have a data frame dft: Date Total Value 02/01/2022 2 03/01/2022 6 03/08/2022 4 03/11/2022 03/15/2022 4 05/01/2022 4 I want to calculate the total value in March, I used the following code: Mar22 = dft.loc[dft[‘Date’].between(’03/01/2022′, ’03/31/2022′, inclusive=’both’),’Total Value’].sum() 03/11/2022 has a null value, which caused an error. What should I add to my… Read More Conduct the calculation only when the value is not null