def METHOD_NAME(self, event):
    filename = wx.SaveFileSelector("Save data as ...", 'HDF (*.hdf)|*.hdf|Comma separated text (*.csv)|*.csv')
    if not filename == '':
        if isinstance(self.data, tabular.TabularBase):
            data = self.data
        else:
            data = tabular.RecArraySource(self.data)
        if filename.endswith('.hdf'):
            data.to_hdf(filename)
        else:
            data.to_csv(filename)