Python
vivien_vivi
这个作者很懒,什么都没留下…
展开
-
No matching distribution found for *
问题: Could not find a version that satisfies the requirement * * No matching distribution found for * * 解决方案 pip install --no-deps * *原创 2020-09-07 21:54:57 · 2716 阅读 · 0 评论 -
pandas从零开始第2天
1.pandas相关函数 (1)df.dropna()函数:丢掉某一行或某一列中,有一个或全部是NaNd的 df.dropna(axis=0,how=‘any’) axis=0 某一行中有NaN的,丢掉这一行 axis=1 某一列中有NaN的,丢掉这一列 how=‘any’ 只要有一个NaN的,某一行就全部丢掉 how=‘all’ 必须全行或全列都为NaN的,才全部丢掉 (2)df.fillna(value=0): 将df中值为NaN的替换为0 (3)df.isnull(): 检查df中是否有NaN,有原创 2020-07-05 22:40:41 · 98 阅读 · 0 评论 -
pandas从零学习第1天
1.创建DateFrame,有三种方法 方法1:不定义标签(行列名称) import pandas as pd import numpy as pd df=pd.DataFrame(np.random.randn(3,4)) 方法2:定义标签(行列值) date=pd.date_range('20200101',periods=3) df1=pd.DataFrame(np.random.randn(3,4),index=date,columns=['a','b','c','d']) 方法3:定义标签原创 2020-06-28 21:30:04 · 218 阅读 · 0 评论 -
python问题
AttributeError: module ‘matplotlib’ has no attribute ‘verbose’) 解决方法 回退matplotlib的版本 比如: pip uninstall matplotlib pip install matplotlib==2.1.0 然后就可以了!原创 2020-06-10 15:27:53 · 90 阅读 · 0 评论 -
Python语法
Python语法欢迎观看简单python教程关键字数字类型标准数据类型列表元组(tuple)集合(set)字典多行语句 欢迎观看简单python教程 你好! 我是一个python的初学者,希望咱们可以一起学习,一起进步! 关键字 >>> import keyword >>> keyword.kwlist 数字类型 int(整数) bool(布尔),如 True...原创 2019-12-04 19:26:24 · 320 阅读 · 1 评论