我有以下关于 corona-tracking-apps 的论文的 df(上面使用了 pd.melt):
CTQ-tool opinion
0 Information and awareness purposes unacceptable
1 Information and awareness purposes unacceptable
2 Information and awareness purposes acceptable
3 Information and awareness purposes acceptable
4 Information and awareness purposes unacceptable
... ... ...
2827 Central/Local data storage NaN
2828 Central/Local data storage NaN
2829 Central/Local data storage NaN
2830 Central/Local data storage NaN
2831 Central/Local data storage NaN
2832 rows × 2 columns
我正在使用 Seaborn 库制作以下 catplot:
代码:
g = sns.catplot("opinion", col="CTQ-tool", col_wrap=4, data=df_original_small, kind="count", height=6.5, aspect=.8)
但是,我不想将它们显示在条形图中,而是将它们显示为饼图。 Seaborn.catplot 不允许使用 kind=‘count-pie’。有谁知道解决方法?
在 TiTo 问题后编辑:
这基本上是我希望看到的所有 8 个条形图发生的情况:
原文由 DeMelkbroer 发布,翻译遵循 CC BY-SA 4.0 许可协议
我最终使用 matplotlib 库从底层构建它: