小编Pec*_*kee的帖子

如何更改 .describe() 输出的格式?

我放入.describe()一个数据框,输出看起来不太好。我希望输出显示整数,而不是用指数简化。

输入:

df["A"].describe()
Run Code Online (Sandbox Code Playgroud)

输出的样子:

count    6.000000e+01
mean     7.123568e+04
std      2.144483e+05
min      1.000000e+02
25%      2.770080e+03
50%      1.557920e+04
75%      4.348470e+04
max      1.592640e+06
Name: A, dtype: float64
Run Code Online (Sandbox Code Playgroud)

预期输出:

count    60.0
mean     7123.568
std      214448.3
min      100.0000
25%      2770.080
50%      15579.20
75%      43484.70
max      1592640.0
Name: A, dtype: float64
Run Code Online (Sandbox Code Playgroud)

python format scientific-notation dataframe pandas

7
推荐指数
4
解决办法
1万
查看次数

标签 统计

dataframe ×1

format ×1

pandas ×1

python ×1

scientific-notation ×1