import pandas as pd import numpy as np df = pd.DataFrame(np.random.randn(4, 2), columns=['a', 'b']) df.style.format("{:.2%}") df['c'] = ['a', 'b', 'c', 'd'] df.style.format({'c': str.upper})
OUTPUT
a b c
0 -0.858957 1.223367 A 1 0.697199 -0.872726 B 2 -0.391889 -1.006809 C 3 0.750373 0.076412 D
2.1m questions
2.1m answers
60 comments
57.0k users