Python Seaborn 在热图中显示 3 位数字的科学记数法
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/29647749/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Seaborn showing scientific notation in heatmap for 3-digit numbers
提问by cigrainger
I'm creating a heatmap from a pandas pivot_table as below:
我正在从熊猫数据透视表创建热图,如下所示:
table2 = pd.pivot_table(df,values='control',columns='Year',index='Region',aggfunc=np.sum)
sns.heatmap(table2,annot=True,cmap='Blues')
It creates a heat map as shown below. You can see the numbers are not huge (max 750), but it's showing them in scientific notation. If I view the table itself this is not the case. Any idea on how I could get it to show the numbers in plain notation?
它创建了一个热图,如下所示。您可以看到这些数字并不大(最多 750 个),但它以科学记数法显示它们。如果我查看表格本身,情况并非如此。关于如何让它以普通符号显示数字的任何想法?