![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
Linky1990
这个作者很懒,什么都没留下…
展开
-
让 python 的输出都在同一行
添加 end 和 flush 参数print(time.ctime(), end="\r", flush=True)原创 2020-03-06 12:00:53 · 5017 阅读 · 1 评论 -
将 json 从 文件中读取到 dict,然后转化为 DataFrame
import pandas as pdimport jsonwith open('my_pic/predict_result/predict_result', 'r') as f: data = json.load(f)https://stackoverflow.com/questions/18837262/convert-python-dict-into-a-dataframe...原创 2020-03-06 11:58:04 · 529 阅读 · 0 评论 -
pip 和 pip3 的区别
在 windows cmd 中,输入 where pip,会显示所有 pip.exe 所在路径。如下所示,第一个路径为 Python27,此时执行 pip install xxx 会将包安装在 Python27\Lib\site-packages 目录下。pip3 也是类似,pip3 install xxx 会默认将包安装在 where pip3 第一个出现的路径上。>> wher...原创 2019-08-02 10:25:09 · 1854 阅读 · 0 评论