
python
Zed__H
这个作者很懒,什么都没留下…
展开
-
pandas出现pandas.core.base.SpecificationError: nested renamer is not supported的错误
pandas.core.baseNote: Removed{}from.agg().# Import librariesimport pandas as pd# DataFramedf = pd.DataFrame({ 'STNAME': ['Alabama']*5, 'CENSUS2010POP': [54571,1822865,27457,22915,57322]})# Group and aggregatex = (df.set_index('STNAM...翻译 2021-06-16 17:02:01 · 434 阅读 · 0 评论 -
centos安装指定python版本
centos8安装python3.8.7https://www.linuxidc.com/Linux/2020-02/162296.htm增加环境变量/use/local/bin,https://www.cnblogs.com/whoamme/p/4039998.html修改软链接,ln -s /usr/local/bin/python3.8 /usr/local/bin/pythonln -s /usr/local/bin/pip3.8 /usr/local/bin/pip...原创 2021-01-03 00:53:48 · 1282 阅读 · 0 评论 -
python的if,while, for, try, with语句
if语句语法"if" assignment_expression ":" suite("elif" assignment_expression ":" suite)* # *表示可以匹配多个elif["else" ":" suite] # 括号和方括号表示可省略eg:if (1<2): # 判断语句1 print('yes') # 执行语句1elif (1==2): # 判断语句2 p翻译 2020-12-16 00:29:57 · 1011 阅读 · 1 评论 -
numpy.meshgrid()的理解
对numpy.meshgrid()最简洁且清晰的解释就是:把两个数组的笛卡尔积内的元素的第一二个坐标分别放入两个矩阵中。xx, yy = np.meshgrid(np.linspace(-1,1,3),np.linspace(-1,1,3)) xxarray([[-1., 0., 1.], [-1., 0., 1.], [-1., 0., ...原创 2019-08-05 18:37:16 · 585 阅读 · 0 评论