How can I load data from mongodb collection into pandas' DataFrame?

后端 未结 4 671
独厮守ぢ
独厮守ぢ 2020-12-07 17:56

I am new to pandas (well, to all things \"programming\"...), but have been encouraged to give it a try. I have a mongodb database - \"test\" - with a collection called \"tw

4条回答
  •  时光说笑
    2020-12-07 18:25

    Comprehend the cursor you got from the MongoDB before passing it to DataFrame

    import pandas as pd
    df = pd.DataFrame(list(tweets.find()))
    

提交回复
热议问题