Skip to content

Instantly share code, notes, and snippets.

@arjay55
Created August 19, 2019 15:55
Show Gist options
  • Save arjay55/31c2b4ab0f80221d0d80bb34a96b3564 to your computer and use it in GitHub Desktop.
Save arjay55/31c2b4ab0f80221d0d80bb34a96b3564 to your computer and use it in GitHub Desktop.
Filling_nans2
dftemp = pd.read_csv('pb_forecast_f.csv', index_col=None)
get_outernan(dfrel.loc[:, 'inflation']) #gets the x and y values
dfrel.iloc[-15:, 2] = dftemp.loc[:, 'Point Forecast'].values
dftemp = pd.read_csv('pb_forecast_b.csv', index_col=None)
dfrel.iloc[:5, 2][::-1] = dftemp.loc[:, 'Point Forecast'].values
dfrel.iloc[:5, 2][::-1] = dftemp.loc[:, 'Point Forecast'].values
fill_data(dfrel) #fills the missing data through forward, backwards fill, and linear interpolation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment