文章预览
标签: python
共找到 61 篇相关文章
文章预览
参考
文章预览
Anaconda 是一个用于科学计算的 Python 发行版, 包含了众多流行的科学计算、数据分析的 Python 包。
这里整理了2023年好用conda和pip国内镜像。
pip国内源设为默认,做法是:
清华pip镜像
-------
>
> pip config set global.index-url
文章预览
[
文章预览
pyinstaller打包 文档 --- ohttps://pyinstaller.readthedocs.io/en/stable/ ohttps://www.cnblogs.com/caijunchao/p/12845620.html 安装 打包 == > > pyinstaller run\_mul.py --clean > …
文章预览
通过eval ------ eval() 函数用来执行一个字符串表达式,并返回表达式的值。 通过eval可以把list,tuple,dict和string相互转化 ``` # Python code to demonstrate # converting string to json # using json.loads import jso…
文章预览
> ```python > df\_date = df['截止日期'].apply(str) > > 用to\_datetime()函数将字符串转换成时间格式,并增加'时间'字段 > ====================================== > > df['截止日期'] = pd.to*datetime(df*date,form…
文章预览
使用二进制读取 ------- You could resolve the problem with: > > for line in open(your\_file\_path, 'rb'): > > > 'rb' is reading the file in binary mode. Read more here. 指定编码 …
文章预览
原始的 Pandas dataframe: ``` df = DataFrame({'A' : [5,6,3,4], 'B' : [1,2,3, 5]}) df A B 0 5 1 1 6 2 2 3 3 3 4 5 ``` 判断单个数据符合: ``` x = df[df['A'] ==…