Numpy' has no attribute 'asscalar' when I add row to table

Hi everyone, I get an AttributeError “module ‘numpy’ has no attribute ‘asscalar’” when I try to add values to my table with the code below :

@anvil.server.callable
def load_fec_file(file):

    with anvil.media.TempFile(file) as txt_file:

            dfa = pd.read_csv(txt_file, delimiter = "\t")
            dfb = dfa.replace({pd.np.nan: None})
            dfc = dfb.fillna(0)
            df5 = dfc.CompteNum

fec = pd.concat(df5, axis=1).reset_index()

            CAPITAL_ET_RESERVES = fec.query('CompteNum >= 100000 and CompteNum < 101000')
            CAPITAL_ET_RESERVES_TotalDebit = CAPITAL_ET_RESERVES.Debit.sum()
            CAPITAL_ET_RESERVES_TotalCredit = CAPITAL_ET_RESERVES.Credit.sum()
            CAPITAL_ET_RESERVES_TotalBalance = CAPITAL_ET_RESERVES_TotalCredit - CAPITAL_ET_RESERVES_TotalDebit
            print(CAPITAL_ET_RESERVES_TotalBalance)
            app_tables.accounting_balance.add_row(CAPITAL_ET_RESERVES_TotalBalance = CAPITAL_ET_RESERVES_TotalBalance)

Any idea on how to solve that ?

UPDATE : I solve it with .item() method