From 1d1544933e45d9b318c2e984d2627c6dd6f55566 Mon Sep 17 00:00:00 2001 From: akmiller01 Date: Thu, 11 Apr 2024 07:16:19 -0400 Subject: [PATCH] Replace pd df append with concat for pandas 2 --- data_updates/Python/iati_rhfp.py | 2 +- data_updates/Python/oecd_data.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data_updates/Python/iati_rhfp.py b/data_updates/Python/iati_rhfp.py index 3a356299f..198d345fe 100644 --- a/data_updates/Python/iati_rhfp.py +++ b/data_updates/Python/iati_rhfp.py @@ -94,7 +94,7 @@ data = data.groupby(["Year","recipient_name","country","Code type"]).agg({"disbursed":"sum"}).reset_index() -data = data.append(pd.DataFrame(data = total_data),ignore_index=True) +data = pd.concat([data, pd.DataFrame(data = total_data)],ignore_index=True) # Put it in millions diff --git a/data_updates/Python/oecd_data.py b/data_updates/Python/oecd_data.py index f57b1f1f5..cc2b0a808 100644 --- a/data_updates/Python/oecd_data.py +++ b/data_updates/Python/oecd_data.py @@ -134,7 +134,7 @@ total_data = recip_data.groupby(["Donor Name","Recipient Name","Year"]).agg({"USD Disbursement Deflated":"sum"}).reset_index() total_data['Purpose Name'] = "Reproductive health care and family planning" -recip_data = recip_data.append(pd.DataFrame(data = total_data),ignore_index=True) +recip_data = pd.concat([recip_data, pd.DataFrame(data = total_data)], ignore_index=True) max_year = recip_data["Year"].max()