format numbers in dataframe pandas

Solutions on MaxInterview for format numbers in dataframe pandas by the best coders in the world

showing results for - "format numbers in dataframe pandas"
Emma
24 Apr 2016
1df.loc[:, "Population"] = df["Population"].map('{:,d}'.format)
2df.loc[:, "PercentageVaccinated"] = df["PercentageVaccinated"].map('{:.2f}'.format)