<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def resample_data(self, data, freq, resampler='mean'):
 """ Resample dataframe. Note ---- 1. Figure out how to apply different functions to different columns .apply() 2. This theoretically work in upsampling too, check docs http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.resample.html Parameters data : pd.DataFrame() Dataframe to resample freq : str resampler : str Resampling type i.e. mean, max. Returns ------- pd.DataFrame() Dataframe containing resampled data """


        if resampler == 'mean':
            data = data.resample(freq).mean()
        elif resampler == 'max':
            data = data.resample(freq).max()
        else:
            raise ValueError('Resampler can be \'mean\' or \'max\' only.')
        
        return data