I have a large dataframe which has a column called Lead Rev
. This column is a field of numbers such as (100000 or 5000 etc.) I want to know how to format these numbers to show commas as thousand separators. The dataset has over 200,000 rows.
Is it something like: '{:,}'.format('Lead Rev')
which gives this error:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-182-5fe9c827d80b> in <module>()
----> 1 '{:,}'.format('Lead Rev')
ValueError: Cannot specify ',' or '_' with 's'.
question from:https://stackoverflow.com/questions/43102734/format-a-number-with-commas-to-separate-thousands-in-python