12 2018 档案
摘要:1.通过pd.DataFrame新建数据框 2.通过df.iloc[]选择特定的列或对象 3.使用Pandas的isnull()判断值是否为空 4.使用all()和any()判断每列包含至少一个为Ture或全部为Ture的情况 5.使用pandas的dropna可以直接删除缺失值 6.使用SKlea
阅读全文
摘要:import pandas as pd #生成重复数据 data1 = ['a',3] data2 = ['b',2] data3 = ['a',3] data4 = ['c',2] df = pd.DataFrame([data1,data2,data3,data4],columns=['col1','col2']) print(df) #判断重复数据 isDuplicated = df.d...
阅读全文
摘要:使用Z标准化得到的阈值作为判断标准,标准化后的得分超过阈值则为正常:
阅读全文
摘要:import pandas as pdimport numpy as npfrom sklearn.preprocessing import Imputer#生成缺失数据df = pd.DataFrame(np.random.randn(6,4),columns=['col1','col2','co
阅读全文
浙公网安备 33010602011771号