df_pred.index=df_pred.index.astype(str)+"Z"# rename the index values
df_pred.index=df_pred.index.str.replace(' ','T')# replace space with T
# IF NEEDED
# df_pred["DateTime"] = df_pred.index # set DateTimeIndex as column
# df_pred = df_pred[df_pred.columns[::-1]] # reverse the order of columns
# df_pred["DateTime"] = pd.to_datetime(df_pred["DateTime"]) # set datatype to datetime (but remove the Z)
# df_pred["DateTime"] = df_pred["DateTime"].apply(lambda x: x.isoformat().replace("+00:00", "Z")) # replace the +00:00 with a Z again (for some reason)
returndf_pred,input_index,pred_index,tot_index
# Creates dataset of previous input and predictions for visualization