-1
df_repayments = pd.DataFrame(list_repayments)
        df_schedule = pd.DataFrame(list_schedule)
        df_payments = df_schedule
        df_payments = df_payments.drop(0)
        df_payments = df_payments.assign(status=df_payments["emi_number"].isin(df_repayments["emiNumber"]).astype(bool))
        print(df_payments)

  emiNumber  status  rePaymentAmount rePaymentDate rePaymentActualDate rePaymentReceivedDate
0          1    True  3468.0000000000    07/11/2022          05/11/2022            05/11/2022
  emi_number emi_due_date emi_amount emi_interest emi_principal principal_balance
1          1   07/11/2022    3467.55       200.00       3267.55           6732.45
2          2   07/12/2022    3467.55       134.65       3332.90           3399.56
3          3   07/01/2023    3467.55        67.99       3399.56              0.00
  emi_number emi_due_date emi_amount emi_interest emi_principal principal_balance  status
1          1   07/11/2022    3467.55       200.00       3267.55           6732.45   False
2          2   07/12/2022    3467.55       134.65       3332.90           3399.56   False
3          3   07/01/2023    3467.55        67.99       3399.56              0.00   False

I tried with isin function but it doesnt work, please point out the flaw or suggest any other way. I want to update the status of repayments in the payment schedule

ram munda
  • 21
  • 3
  • 3
    Hard to comment on what's wrong when we have no clue what you're trying to do... – mozway Aug 13 '23 at 09:08
  • Your question needs a minimal reproducible example consisting of sample input, expected output, actual output, and only the relevant code necessary to reproduce the problem. See [How to make good reproducible pandas examples](https://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples) for best practices related to Pandas questions – itprorh66 Aug 13 '23 at 15:03

0 Answers0