【发布时间】:2021-12-19 07:29:19
【问题描述】:
Department left
IT 0 0.777506
1 0.222494
RandD 0 0.846252
1 0.153748
accounting 0 0.734029
1 0.265971
hr 0 0.709066
1 0.290934
management 0 0.855556
1 0.144444
marketing 0 0.763403
1 0.236597
product_mng 0 0.780488
1 0.219512
sales 0 0.755072
1 0.244928
support 0 0.751009
1 0.248991
technical 0 0.743750
1 0.256250
This graph generated using pandas plot 1: [https://i.stack.imgur.com/thBjs.png]1 当我们在 pandas hue 中构建图形时,它是一个多索引数据框。我需要与 seaborn 或 pyplot 中的完全相同。提前感谢您的回复!
【问题讨论】:
-
使用
sns.barplotseaborn.pydata.org/generated/seaborn.barplot.html -
以某种格式提供您的数据框。那么只有别人可以帮助你。
标签: python pandas dataframe matplotlib seaborn