预先感谢您的帮助!(下面提供的代码)(此处的数据)
我想删除 5 厘米到 225 厘米列的 5/6 标准差之外的异常值,并将它们替换为该日期(月/日)和深度的平均值。最好的方法是什么?
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import warnings
warnings.filterwarnings('ignore')
raw_data = pd.read_csv('all-deep-soil-temperatures.csv', index_col=1, parse_dates=True)
df_all_stations = raw_data.copy()
df_selected_station.fillna(method = 'ffill', inplace=True);
df_selected_station_D=df_selected_station.resample(rule='D').mean()
df_selected_station_D['Day'] = df_selected_station_D.index.dayofyear
mean=df_selected_station_D.groupby(by='Day').mean()
mean['Day']=mean.index
mean.head()
慕村225694
相关分类