首页 > 解决方案 > 当我在 powerbi 中运行 python 代码时没有显示数据。使用 pymongo

问题描述

import pymongo
import dns

import pandas as pd
import matplotlib as md
client = pymongo.MongoClient("mongodb+srv://<username>:<password>@cluster0.zev7c.mongodb.net/myFirstDatabase?retryWrites=true&w=majority")


cursor=client.study.college.find({})
for doc in cursor:
    print (doc)

我可以在 python 中运行这段代码,我得到了输出。但是当我在 powerbi 中运行相同的代码时,数据没有显示。

标签: pythonpowerbipymongo

解决方案


推荐阅读