Python

python中dict转换为json
字典保存保存为json文件 json.dump: 它将Python对象序列化为JSON字符串,并将JSON数据写入文件,因此适用于将数据保存到磁盘文件中。 data = {'a':1,'b':2}
with open("data.json", "w",encoding='utf-8') as f:
Anaconda的基本使用
1、查看存在的虚拟环境 conda env list
conda info -e 2、创建虚拟环境,指定名称 conda create -n 环境名称 python==3.6 3、创建虚拟环境,指定路径 conda create --prefix "/path/to/env" 4、激活虚拟环境 co
Jupyter的安装与启动
1、安装 pip install jupyter 2、启动 # 以root权限启动
jupyter notebook --allow-root
# 以root权限后台启动
nohup jupyter notebook --allow-root & 3、生成配置文件 jupyter notebook