python - 如何将文件保存到我的系统或直接连接到 PowerBI
问题描述
所以我在 Chrome 上的 Jupyter Notebook 中读取了一个 CSV 文件(使用 pd.read_csv())
它由大约 86,000 行和大约 5 列组成。它是数字和字符串数据的混合体。我清理/操作它添加一列并删除空值。
我现在希望在我的 PowerBI 中连接这些数据以将其可视化。
我可以将其保存为我的计算机中的 JSON 文件,然后将其上传到 powerBI 中吗?
有没有办法直接将所有内容转储到 PowerBI 报告中?
我有哪些选择?
解决方案
您可以在 PowerBI webapp 中复制并粘贴报表的内容
准备好报告后,保存它,您可以通过安装 powerbiclient 库使用 jupyter notebook book 访问 Power BI 报告
from powerbiclient.authentication import DeviceCodeLoginAuthentication
device_auth = DeviceCodeLoginAuthentication()
token_with_device_code = device_auth.get_access_token()
group_id='ca8b6b59-919d-4f7e-92a2-eab66a7dd536' #your groupid in workspace
report_id='5cb9a453-b3b0-4695-98c9-98ed8f7ad4ba' #your report id in workspace
report=Report(group_id=group_id,report_id=report_id,auth=device_auth)
report
如果遇到困难,您可以参考我关于如何在 jupyter notebook 中连接 powerBI 报告的帖子
推荐阅读
- react-native - React Native:删除 Expo Cookie
- jquery - 在一行中将多个按钮插入页面
- c# - 如何在wpf中具有大层次结构的子控件和父窗口之间进行通信?
- sql - VBA 函数/代码 - 将动态数据列转换为文本字符串
- java - 为 Azure 存储访问生成 SAS
- html - 如何正确堆叠单子以最终呈现为 html?
- javascript - 为什么“订购”:假不在另一个表中工作
- git - AWS:部署 Github 分支而不是提交
- reporting-services - 如何格式化 datediff 以显示 hh:mm
- python - 使用 python 和 Selenium 等待元素可点击