python-3.x - 在 python 中使用 ggplot 的 Power BI
问题描述
我在 Python 中为 Power BI 创建了以下代码。这没有显示任何东西。
# The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script:
# dataset = pandas.DataFrame(Company, Target)
# dataset = dataset.drop_duplicates()
# Paste or type your script code here:
import matplotlib.pyplot as plt
from plotnine import *
from plotnine.data import mpg
(ggplot(dataset) # data
+ aes(x='Company') # variable
+ geom_bar(size=20)) # ype of plot
plt.show()
解决方案
推荐阅读
- keras - 方法对象不可下标
- python - 为大量列重构 Pandas 数据框
- tags - Magento 1 产品标签页面和元数据
- firebase - 如何在firestore中存储模型类对象列表?
- r - 我需要总和值而不是条形图中的计数值
- java - Is it possible to reuse the input without storing it into a variable after used for a condition?
- spring - 无法从 Elastic Beanstalk Docker 连接到 RDS
- google-analytics - Google Analytics / Google Tag Manager - track user engagement time
- c - printf epochtime 显示错误的值
- android - HttpURLConnection 在 targetSdkVersion 29 的某些设备上超时