[{'role': 'system', 'content': "You are an expert in machine learning and your task is to classify the code snippets into categories from the provided list of categories. List of categories: ['helper_functions', 'load_data', 'data_exploration', 'data_preprocessing', 'evaluation', 'modelling', 'prediction', 'result_visualization', 'save_results', 'comment_only']"}, {'role': 'user', 'content': 'Identify to which category the provided code belongs and assign the code snippet to at least 1 but up to 5 categories based on the probabilities, ignore if the probability of the category is negligible. Strictly provide your response as a list. Avoid providing any additional information, commentary, or personal opinions.\\nPython Code:def clean_data(use_text_columns = True):\n    \'\'\'\n    Function that clean data and create a new features to enrich the model\n    \'\'\'\n    cols_num = ["Sales", "DayOfWeek", "Open", "Promo", "SchoolHoliday", "CompetitionDistance",\n                "CompetitionOpenSinceMonth", "CompetitionOpenSinceYear", "Promo2",\n                "Promo2SinceWeek", "Promo2SinceYear", "Wapp", "Avg_Customers", "Year", "Month", "Day",\n                "CompetitionOpen", "PromoOpen", "IsPromoMonth", "Store"]\n\n    cols_text = ["StateHoliday", "StoreType", "Assortment"]\n\n    df_train = pd.read_csv(\'../input/train.csv\')    \n    len_train_data = len(df_train)\n\n    df_test = pd.read_csv(\'../input/test.csv\')\n\n    # Setting null values of column Open in test dataset\n    df_test.loc[df_test[\'DayOfWeek\'] != 7, \'Open\'] = 1\n    df_test.loc[df_test[\'DayOfWeek\'] == 7, \'Open\'] = 0\n\n    avg_customer = sqldf(\n      """\n      SELECT\n      Store,\n      DayOfWeek,\n      sum(case when Customers is not null then Sales/Customers else 0 end) as Wapp,\n      round(avg(Customers)) Avg_Customers\n      from df_train\n      group by Store,DayOfWeek\n      """\n    )\n    \n    df_test = sqldf(\n      """\n      SELECT\n      t.*,\n      ac.Wapp,\n      ac.Avg_Customers\n      from df_test t\n      left join avg_customer ac on t.Store = ac.Store and t.DayOfWeek = ac.DayOfWeek\n      """\n    )\n    \n    df_train = sqldf(\n      """\n      SELECT\n      t.*,\n      ac.Wapp,\n      ac.Avg_Customers\n      from df_train t\n      left join avg_customer ac on t.Store = ac.Store and t.DayOfWeek = ac.DayOfWeek\n      """\n    )\n\n    # Merge train and test dataset\n    all_data = pd.concat([df_train, df_test], ignore_index=True)\n\n    df_extra = pd.read_csv(\'../input/store.csv\')\n    df_full = pd.concat([df_train, df_test]).reset_index(drop=True)\n\n    # Merge extra information about stores\n    all_data = df_full.merge(df_extra, left_on=[\'Store\'], right_on=[\'Store\'], how=\'left\')\n\n    # Separate date in Year, Month and Day\n    all_data.loc[all_data[\'StateHoliday\'] == 0, \'StateHoliday\'] = \'d\'\n    all_data[\'Year\'] = pd.DatetimeIndex(all_data[\'Date\']).year\n    all_data[\'Month\'] = pd.DatetimeIndex(all_data[\'Date\']).month\n    all_data[\'Day\'] = pd.DatetimeIndex(all_data[\'Date\']).day\n    all_data[\'WeekOfYear\'] = pd.DatetimeIndex(all_data[\'Date\']).weekofyear\n\n    # Calculate competition open in months\n    all_data[\'CompetitionOpen\'] = 12 * (all_data.Year - all_data.CompetitionOpenSinceYear) + \\\\\n        (all_data.Month - all_data.CompetitionOpenSinceMonth)\n\n    # Calculate promo open time in months\n    all_data[\'PromoOpen\'] = 12 * (all_data.Year - all_data.Promo2SinceYear) + \\\\\n        (all_data.WeekOfYear - all_data.Promo2SinceWeek) / 4.0\n    all_data[\'PromoOpen\'] = all_data.PromoOpen.apply(lambda x: x if x > 0 else 0)\n    all_data.loc[all_data.Promo2SinceYear == 0, \'PromoOpen\'] = 0\n    \n    # Transform month interval in a boolean column \n    month2str = {1:\'Jan\', 2:\'Feb\', 3:\'Mar\', 4:\'Apr\', 5:\'May\', 6:\'Jun\',\n                 7:\'Jul\', 8:\'Aug\', 9:\'Sept\', 10:\'Oct\', 11:\'Nov\', 12:\'Dec\'}\n    all_data[\'monthStr\'] = all_data.Month.map(month2str)\n    all_data.loc[all_data.PromoInterval == 0, \'PromoInterval\'] = \'\'\n    all_data[\'IsPromoMonth\'] = 0\n    for interval in all_data.PromoInterval.unique():\n        interval = str(interval)\n        if interval != \'\':\n            for month in interval.split(\',\'):\n                all_data.loc[(all_data.monthStr == month) & (all_data.PromoInterval == interval), \'IsPromoMonth\'] = 1\n\n    data_numeric = all_data[cols_num]\n    \n    # Fill NAN values\n    # Only column CompetitionDistance is fill NaN with a median value\n    data_numeric[\'CompetitionDistance\'].fillna(data_numeric[\'CompetitionDistance\'].median(), inplace = True)\n\n    # Other values is fill with zero\n    data_numeric.fillna(0, inplace = True)\n\n    if (use_text_columns):\n        data_text = all_data[cols_text]\n        data_text = pd.get_dummies(data_text, dummy_na=False)\n\n        complete_data = pd.concat([data_numeric, data_text], axis = 1)\n\n        df_train = complete_data.iloc[:len_train_data,:]\n        df_test = complete_data.iloc[len_train_data:,:]\n    else:\n        df_train = data_numeric.iloc[:len_train_data,:]\n        df_test = data_numeric.iloc[len_train_data:,:]\n\n    return df_train, df_test\''}, {'role': 'assistant', 'content': "['load_data']"}]