0

Want to pandas style Currency : Rupee \u20B9 (How to print currency symbol and an n-digit decimal number right aligned in Python)

format_dict = {'Premium Per Rep':'{0:,.0f}'}
f1=f.style.background_gradient().format(format_dict)

However, getting the below (works for $)

Bad Format

Henry Ecker
  • 34,399
  • 18
  • 41
  • 57
Shivam Anand
  • 91
  • 1
  • 10

1 Answers1

0

Need to define the format spec correctly:

df.style.format('\u20B9{:,.0f}')
Attack68
  • 4,437
  • 1
  • 20
  • 40