How do I make it so that datei and datej don't have a time componant, only the date one?…
- User
How do I make it so that date_i and date_j don't have a time componant, only the date one? because right now they have the time as the columns in df_diff.
d_df_diff = {} for c in d_df_preds_periode_lcdp.keys(): df_diff = pd.DataFrame() for date_i in d_df_preds_periode_lcdp['Prédiction CrostonClassic'].columns: for date_j in d_df_preds_periode_lcdp['Prédiction CrostonClassic'].columns: #Test 1 #date_i, date_j = pd.to_datetime(date_i).dt.date, pd.to_datetime(date_j).dt.date #Test 2 #date_i, date_j = date_i.date(), date_j.date() if date_j > date_i: cur_diff = compare(d_df_preds_periode_lcdp[c],df_ventes_periode_lcdp,date_i,date_j) df_diff[f"{date_i}/{date_j}"] = cur_diff d_df_diff[c] = df_diff
I tried (separately) the 2 versions that I commented but neither of them worked.
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.