I need all dates to show in grouping not only the first date. My code is as follows: df_g = df.groupby(['Week Commencing', 'Day of Week', 'Day Name', 'Store', 'BA Present'], as_index=False)['EPOS Actuals Sum'].sum()#.sort_values(by='Week Commencing', ascending=False)
table_d = pd.pivot_table(df_g, values='EPOS Actuals Sum', index=['Week Commencing', 'Store'],
columns=['Day of Week', 'Day Name'], aggfunc=np.sum)
print (table_d)
table_d.to_excel("output_sample_pivoted_from_domo_inc_base"