def add_hotline_features(self, hotline):
    'Add the hotline features to the adres dataframe.'
    merge = self.data.merge(hotline, on='wng_id', how='left')
    adres_groups = merge.groupby(by='adres_id')
    hotline_counts = adres_groups['id'].agg(['count'])
    hotline_counts.columns = ['aantal_hotline_meldingen']
    self.data = self.data.merge(hotline_counts, on='adres_id', how='left')
    self.version += '_hotline'
    self.save()
    print('The adres dataset is now enriched with hotline data.')
Add the hotline features to the adres dataframe.
def add_hotline_features(self, hotline):
    
    merge = self.data.merge(hotline, on='wng_id', how='left')
    adres_groups = merge.groupby(by='adres_id')
    hotline_counts = adres_groups['id'].agg(['count'])
    hotline_counts.columns = ['aantal_hotline_meldingen']
    self.data = self.data.merge(hotline_counts, on='adres_id', how='left')
    self.version += '_hotline'
    self.save()
    print('The adres dataset is now enriched with hotline data.')