i have some hourly historical data as csv files in some parts ,part of data is missed…
- User
i have some hourly historical data as csv files in some parts ,part of data is missed like 3/6/2021 2:00 in following :
3/5/2021 20:00 3/5/2021 21:00 3/5/2021 22:00 3/5/2021 23:00 3/6/2021 0:00 3/6/2021 1:00 3/6/2021 3:00 3/6/2021 4:00 3/6/2021 5:00 3/6/2021 6:00
i want to place missed hours and fill their values with mean of the before and after data
each row has following dat: Unix Date Symbol Open High Low Close volume_crypto volume_base tradecount volume_adi volume_obv volume_cmf volume_fi volume_em volume_sma_em volume_vpt volume_vwap volume_mfi volume_nvi volatility_bbm volatility_bbh volatility_bbl volatility_bbw volatility_bbp volatility_bbhi volatility_bbli volatility_kcc volatility_kch volatility_kcl volatility_kcw volatility_kcp volatility_kchi volatility_kcli volatility_dcl volatility_dch volatility_dcm volatility_dcw volatility_dcp volatility_atr volatility_ui trend_macd trend_macd_signal trend_macd_diff trend_sma_fast trend_sma_slow trend_ema_fast trend_ema_slow trend_vortex_ind_pos trend_vortex_ind_neg trend_vortex_ind_diff trend_trix trend_mass_index trend_dpo trend_kst trend_kst_sig trend_kst_diff trend_ichimoku_conv trend_ichimoku_base trend_ichimoku_a trend_ichimoku_b trend_stc trend_adx trend_adx_pos trend_adx_neg trend_cci trend_visual_ichimoku_a trend_visual_ichimoku_b trend_aroon_up trend_aroon_down trend_aroon_ind trend_psar_up trend_psar_down trend_psar_up_indicator trend_psar_down_indicator momentum_rsi momentum_stoch_rsi momentum_stoch_rsi_k momentum_stoch_rsi_d momentum_tsi momentum_uo momentum_stoch momentum_stoch_signal momentum_wr momentum_ao momentum_roc momentum_ppo momentum_ppo_signal momentum_ppo_hist momentum_pvo momentum_pvo_signal momentum_pvo_hist momentum_kama others_dr others_dlr others_cr sma_3 sma_5 sma_7 sma_10 sma_20 sma_50 sma_100 sma_200 ema_3 ema_5 ema_7 ema_9 ema_12 ema_20 ema_26 ema_50 ema_100 ema_200 wma_3 wma_5 wma_7 wma_9 wma_14 wma_20 wma_50 wma_100 wma_200 rsi_3 rsi_5 rsi_7 rsi_14 rsi_9 rsi_25 rsi_50 macd_short signal_short hist_short macd_shorter signal_shorter hist_shorter macd_short_mid signal_short_mid hist_short_mid macd_short_long signal_short_long hist_short_long 1.61408E+12 2/23/2021 12:00 1INCHBUSD 3.8097 3.9 2.64 3.45 42666.61 142948.4199 643 12190.46 42666.61 0.285714286 0 0 0 0 3.33 50 1000 3.45 3.45 3.45 0 0 0 0 3.33 4.59 2.07 75.67567568 0.547619048 0 0 2.64 3.9 3.27 36.52173913 0.642857143 0 0 0 0 0 3.45 3.45 3.45 3.45 0 0 0 106.2014453 1 -1.779810821 1065.634267 1065.634267 0 3.27 3.27 3.27 3.27 0 0 0 0 0 1.672463509 1.678777784 0 0 0 3 3.9 0 0 100 0 0 0 0 0 64.28571429 64.28571429 -35.71428571 0 0 0 0 0 0 0 0 3.45 0 0 0
give me proper python code
- Assistant