其他分享
首页 > 其他分享> > pandas常用函数

pandas常用函数

作者:互联网

temp = temp[temp[col].isnull()]
abnormal_index = temp.index.tolist()

df.loc[abnormal_index,"abnormal_flag"] = 1

df.loc[:, col].diff()

df["diff"].rolling(window=window - 1).sum()

df.drop(["diff", "roll"], axis=1, inplace=True)

temp.interpolate(method="linear",axis=1,inplace=True)
temp.fillna(method="ffill", axis=1,inplace=True)
temp.fillna(method="bfill", axis=1,inplace=True)

标签:常用,函数,temp,df,abnormal,inplace,True,pandas,axis
来源: https://www.cnblogs.com/chentianyu/p/16054139.html