My data contain a bunch of floats, which I'd like to format as follows:
- Thousand separator is a dot
- Decimal separator is comma
- Always show two decimals
- add Euro sign
This is what I got so far:
import pandas as pd
df = pd.DataFrame({'x': [1.50,
2.3456,
10000.22,
100.3,
6800]})
df['x'].map('{:.2f} €'.format)
This yields
0 1.50 €
1 2.35 €
2 10000.22 €
3 100.30 €
4 6800.00 €
Name: x, dtype: object
Desired outcome is however:
0 1,50 €
1 2,35 €
2 10.000,22 €
3 100,30 €
4 6.800,00 €
Name: x, dtype: object
How can this be done?