0
感謝關於我的問題:) here is the snapshot of Robomongo如何通過Python獲得MongoDB中文件的密鑰類型
正如你看到的,我可以看到任何密鑰類型MongoDB中的任何文件內。但是我怎樣才能獲得Python或MongoDB語言的類型? Thanks for all
感謝關於我的問題:) here is the snapshot of Robomongo如何通過Python獲得MongoDB中文件的密鑰類型
正如你看到的,我可以看到任何密鑰類型MongoDB中的任何文件內。但是我怎樣才能獲得Python或MongoDB語言的類型? Thanks for all
如果您在您的Python中使用PyMongo,以下代碼將打印該類型。
database_con = connection[database_name]
for collection_i in db.collection_names():
collection_data = database_con[collection_i]
for dict_j in collection_data.find():
for key_k in dict_j.keys():
print type(dict_j[key_k])