The reason you are getting just 7 rows is because
groupsummary(MyTable, 'Date_Time', 'dayname', @nanmean);
averages across the entire year.
To get weekday averages for each month (a 7×12 matrix), you’ll need to group by both day name and month.
You can use the following workaround to fix it:
MyTable.Month = month(MyTable.Date_Time);
MyTable.DayName = categorical(day(MyTable.Date_Time, 'longname'));
Summary = groupsummary(MyTable, {'DayName', 'Month'}, 'nanmean');
Result = unstack(Summary, 'nanmean_YourVar', 'Month');
‘YourVar’ is the variable that you are using for averaging.
This gives you 7 rows (Mon–Sun) and 12 columns (Jan–Dec), just as needed.
Please refer to this documentation for more details: