0

Okay, I've got a dataframe of data which I've filtered.

Let's not worry about the data - I just want to sum and present that data in a resonable format.

Just so you see the preable code.

sum_of_income = data.loc[(data["charity_name"].str.contains("CITIZEN")) \
    & (data["charity_name"].str.contains("ADVICE")) \
    & (data['charity_registration_status']!="Removed")]['latest_income'].sum()

print(f"£{sum_of_income}")

I can't work out the f string to convert the value, such as 23499983784.06 tnto something like £23,499,983,784

Barmar
  • 741,623
  • 53
  • 500
  • 612
elksie5000
  • 7,084
  • 12
  • 57
  • 87

0 Answers0