标签:panda 标准 and excel coding desc xls data esc
#异常值的处理
import pandas as pd
import numpy as np
SegData=pd.read_csv(‘./data/data1.csv‘,encoding=‘gbk‘)
SegData.head()
SegData.describe().T
SegData.loc[:,‘供应商进货价‘][SegData.供应商进货价>30000]
SegData.loc[3,‘供应商进货价‘]=np.nan
SegData.describe().T
data=pd.read_excel(‘./data/data4.xlsx‘,header=None)
print(data)
#标准分数
(data-data.mean())/data.std()
标签:panda 标准 and excel coding desc xls data esc
原文地址:https://www.cnblogs.com/tiankong-blue/p/11621289.html