Last active
June 7, 2017 08:06
-
-
Save whbzju/d7ac96ec428968002a1213cea004397a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 异常点去除 | |
for i in COLUMNS_c: | |
df[i] = df[np.abs(df[i]-df[i].mean())<=(3*df[i].std())][i] #keep only the ones that are within +3 to -3 standard deviations in the column 'Data'. | |
## 设置格式,显示多一些 | |
pd.set_option('display.height', 1000) | |
pd.set_option('display.max_rows', 500) | |
pd.set_option('display.max_columns', 500) | |
pd.set_option('display.width', 1000) | |
## 自定义na的值 | |
pd.read_csv('20170524.train.csv.sample', names=COLUMNS, | |
na_values='null') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment