Reputation: 709
I want to convert a column that has values like 1234567.89 to 1,234,567.89. Can someone help me with this.
Upvotes: 19
Views: 21610
Reputation: 3862
You can format your column by doing this:
df['new_column_name'] = df['column_name'].map('{:,.2f}'.format)
But keep in mind that the new column will contain strings, not floats.
Upvotes: 33