masstable/masstable.py
def to_file(self, path):
        """Export the contents to a file as comma separated values.

        Parameters
        ----------
        path : string
            File path where the data should be saved to

        Example
        -------
        Export the last ten elements of AME2012 to a new file:

        >>> Table('AME2012').tail(10).to_file('last_ten.txt')
        """
        with open(path, 'w') as f:
            f.write('Z   N   M\n')
        self.df.to_csv(path, sep='\t', mode='a')
def to_file(self, path):
        """Export the contents to a file as comma separated values.

        Parameters
        ----------
        path : string
            File path where the data should be saved to

        Example
        -------
        Export the last ten elements of AME2012 to a new file:

        >>> Table('AME2012').tail(10).to_file('last_ten.txt')
        """
        with open(path, 'w') as f:
            f.write('Z   N   M\n')
        self.df.to_csv(path, sep='\t', mode='a')
Export the contents to a file as comma separated values.

        Parameters
        ----------
        path : string
            File path where the data should be saved to

        Example
        -------
        Export the last ten elements of AME2012 to a new file:

        >>> Table('AME2012').tail(10).to_file('last_ten.txt')