pandas set currency code example
Example 1: pandas show large numbers with commas
pd.options.display.float_format = '{:,}'.format
123456789.12345 -> 123,456,789.12345
pd.options.display.float_format = '{:,.2f}'.format
123456789.12345 -> 123,456,789.12
pd.options.display.float_format = '${:,.2f}'.format
123456789.12345 -> $123,456,789.12
Example 2: pandas currency to numbe
df[df.columns[1:]] = df[df.columns[1:]].replace('[\$,]', '', regex=True).astype(float)
Example 3: pandas make currency with commas
'${:,.2f}'.format