文档展示了如何使用 执行此操作,但是如何在 python 脚本中mongosh创建Time Series Collectionusing呢?pymongo
import pymongo
import time
from datetime import datetime
client = pymongo.MongoClient()
db = client['time-series-db']
col = db['time-series-col']
# ... do something here to make it 'time-series collection' ...
js = {
"1": "A",
"2": "B",
"3": "C",
"4": "D",
"5": "E",
}
# create BSON type datetime object needed for 'time-series collection'
ts = time.time()
js['timestamp'] = datetime.utcfromtimestamp(ts)
col.insert_one(js)
Run Code Online (Sandbox Code Playgroud) 使用安装包时conda intall,如何知道要使用哪个渠道?
conda install 包名(默认频道)conda install -c anaconda 包裹名字conda install -c conda-forge 包裹名字conda install -c some-other-channels 软件包名称我知道人们说频道并不重要,但我在安装时遇到了这个问题jupyter-
\n当我尝试时,设置时conda install jupyter出现错误。\n但是当我尝试时,它工作正常。ImportError: DLL load failedjupyter notebookconda install -c anaconda jupyter
在Anaconda Cloudjupyter上搜索就会有不同渠道提供的套餐。
python ×3
aiohttp ×1
anaconda ×1
conda ×1
conda-forge ×1
event-loop ×1
jupyter ×1
mongodb ×1
pymongo ×1