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
            Resampling frequency i.e. d, h, 15T...
        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