Naming conventions for dataframes
Why not give them a name describing their purpose?

df_csv = read_csv('customer_data_export.csv')
df_date_filtered = df.query("date &gt; '2017-01-10'")
df_grouped_by_trans_id = df_date_filtered.groupby('transaction_id').sum()

#cleanup
rm(df_csv, df_date_filtered)

plot_data = pivot_table(df_grouped_by_trans_id, columns='weekday', rows='n_items')