np.isnan(all_chevorlet.any()) #and gets False np.isfinite(all_chevorlet.all()) #and gets True
꿀팁! 데이터분석할땐 python으로 힘들면 샘플을 엑셀로 다뤄보기 python으로 다루면 잘 보이지 않았던 것들이 엑셀로보니까 다양하게 좀더 직관적으로 데이터를 훑어볼 수 있었음.
for col in test.columns: if test[col].isna().sum()>0: print (col,test[col].isna().sum())
https://www.manning.com/books/deep-learning-with-javascript
https://experiments.withgoogle.com
humidity = humidity.fillna(method='ffill') It is cleaned using fillna() method with ffill parameter which propagates last valid observation to fill gaps .fillna(method='bfill') First, we used ffill parameter which propagates last valid observation to fill gaps. Then we use bfill to propogate next valid observation to fill gaps. bfill이 뒤에 걸로 앞으 Nan값을 채우겠다는 뜻.
https://github.com/facebook/prophet/issues/725 import pickle pkl_path = "path/to/save/Prophet.pkl" with open(pkl_path, "wb") as f: # Pickle the 'Prophet' model using the highest protocol available. pickle.dump(m, f) # save the dataframe forecast.to_pickle("path/to/data/forecast.pkl") print("*** Data Saved ***")Then to load them again# read the Prophet model object with open(pkl_path, 'rb') as f:..
https://machinelearningmastery.com/save-arima-time-series-forecasting-model-python/ from statsmodels.tsa.arima_model import ARIMA, ARIMAResults# fit modelmodel = ARIMA(X, order=(1,1,1))model_fit = model.fit()# save modelmodel_fit.save('model.pkl')# load modelloaded = ARIMAResults.load('model.pkl')