[{'role': 'system', 'content': "You are an expert in machine learning and your task is to classify code snippets into one of the following categories: ['helper_functions', 'load_data', 'data_exploration', 'data_preprocessing', 'evaluation', 'modelling', 'prediction', 'result_visualization', 'save_results', 'comment_only']."}, {'role': 'user', 'content': 'Identify the single most appropriate category to which the provided code belongs. Provide your response as a single category label without any additional information, commentary, or personal opinions.\\nPython Code:def reformat_time(reformat, ax):\n    ax.xaxis.set_major_locator(dates.WeekdayLocator())\n    ax.xaxis.set_major_formatter(dates.DateFormatter(\'%b %d\'))    \n    if reformat: #reformat again if you wish\n        date_list = train_data_by_date.reset_index()["Date"].tolist()\n        x_ticks = [dt.datetime.strftime(t,\'%Y-%m-%d\') for t in date_list]\n        x_ticks = [tick for i,tick in enumerate(x_ticks) if i%8==0 ]# split labels into same number of ticks as by pandas\n        ax.set_xticklabels(x_ticks, rotation=90)\n    # cosmetics\n    ax.yaxis.grid(linestyle=\'dotted\')\n    ax.spines[\'right\'].set_color(\'none\')\n    ax.spines[\'top\'].set_color(\'none\')\n    ax.spines[\'left\'].set_color(\'none\')\n    ax.spines[\'bottom\'].set_color(\'none\')\n\ntrain_data[\'Date\'] = pd.to_datetime(train_data[\'Date\'])\ntrain_data_by_date = train_data.groupby([\'Date\'],as_index=True).agg({\'ConfirmedCases\': \'sum\',\'Fatalities\': \'sum\', \n                                                                     \'NewConfirmedCases\':\'sum\', \'NewFatalities\':\'sum\', \'MortalityRate\':\'mean\'})\nnum0 = train_data_by_date._get_numeric_data() \nnum0[num0 < 0.0] = 0.0\n#display(train_data_by_date.head())\n\n## ======= Sort by countries with fatalities > 600 ========\n\ntrain_data_by_country_max = train_data.groupby([\'Country_Region\'],as_index=True).agg({\'ConfirmedCases\': \'max\', \'Fatalities\': \'max\'})\ntrain_data_by_country_fatal = train_data_by_country_max[train_data_by_country_max[\'Fatalities\']>600]\ntrain_data_by_country_fatal = train_data_by_country_fatal.sort_values(by=[\'Fatalities\'],ascending=False).reset_index()\n#display(train_data_by_country_fatal.head(20))\n\ndf_merge_by_country = pd.merge(train_data,train_data_by_country_fatal[\'Country_Region\'],on=[\'Country_Region\'],how=\'inner\')\ndf_max_fatality_country = df_merge_by_country.groupby([\'Date\',\'Country_Region\'],as_index=False).agg({\'ConfirmedCases\': \'sum\',\n                                                                                                     \'Fatalities\': \'sum\',\n                                                                                                     \'NewConfirmedCases\':\'sum\',\n                                                                                                     \'NewFatalities\':\'sum\',\n                                                                                                     \'MortalityRate\':\'mean\'})\n\nnum1 = df_max_fatality_country._get_numeric_data() \nnum1[num1 < 0.0] = 0.0\ndf_max_fatality_country.set_index(\'Date\',inplace=True)\n#display(df_max_fatality_country.head(20))\n\ncountries = train_data_by_country_fatal[\'Country_Region\'].unique()\n\nplt.rcParams.update({\'font.size\': 16})\n\nfig,(ax0,ax1) = plt.subplots(1,2,figsize=(15, 8))\nfig,(ax2,ax3) = plt.subplots(1,2,figsize=(15, 8))#,sharey=True)\n\ntrain_data_by_date.ConfirmedCases.plot(ax=ax0, x_compat=True, title=\'Confirmed Cases Globally\', legend=\'Confirmed Cases\',\n                                       color=discrete_col)#, logy=True)\nreformat_time(0,ax0)\ntrain_data_by_date.NewConfirmedCases.plot(ax=ax0, x_compat=True, linestyle=\'dotted\', legend=\'New Confirmed Cases\',\n                                          color=discrete_col)#, logy=True)\nreformat_time(0,ax0)\n\ntrain_data_by_date.Fatalities.plot(ax=ax2, x_compat=True, title=\'Fatalities Globally\', legend=\'Fatalities\', color=\'r\')\nreformat_time(0,ax2)\ntrain_data_by_date.NewFatalities.plot(ax=ax2, x_compat=True, linestyle=\'dotted\', legend=\'Daily Deaths\',color=\'r\')#tell pandas not to use its own datetime format\nreformat_time(0,ax2)\n\nfor country in countries:\n    match = df_max_fatality_country.Country_Region==country\n    df_fatality_by_country = df_max_fatality_country[match] \n    df_fatality_by_country.ConfirmedCases.plot(ax=ax1, x_compat=True, title=\'Confirmed Cases Nationally\')\n    reformat_time(0,ax1)\n    df_fatality_by_country.Fatalities.plot(ax=ax3, x_compat=True, title=\'Fatalities Nationally\')\n    reformat_time(0,ax3)\n    \n#ax1.legend(countries)\n#ax3.legend(countries)\nax1.legend(countries, loc=\'center left\',bbox_to_anchor=(1.0, 0.5))\nax3.legend(countries, loc=\'center left\',bbox_to_anchor=(1.0, 0.5))\n\''}, {'role': 'assistant', 'content': 'result_visualization'}]