Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
348 views
in Technique[技术] by (71.8m points)

dataframe - '%' Format style not working no errors showing (MAC with FIREFOX)

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

question from:https://stackoverflow.com/questions/66050583/format-style-not-working-no-errors-showing-mac-with-firefox

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...