@classmethod
def table_to_toml(cls, n, file):
    """Convert bearing parameters to toml.

        Convert a table with parameters of a bearing element to a dictionary ready to save
        to a toml file that can be later loaded by ross.

        Parameters
        ----------
        n : int
            The node in which the bearing will be located in the rotor.
        file: str
            Path to the file containing the bearing parameters.

        Returns
        -------
        data: dict
            A dict that is ready to save to toml and readable by ross.

        Examples
        --------
        >>> import os
        >>> file_path = os.path.dirname(os.path.realpath(__file__)) + '/tests/data/bearing_seal_si.xls'
        >>> BearingElement.table_to_toml(0, file_path) # doctest: +ELLIPSIS
        {'n': 0, 'kxx': [...
        """
    b_elem = cls.from_table(n, file)
    data = {'n': b_elem.n, 'kxx': b_elem.kxx.coefficient, 'cxx': b_elem.cxx
        .coefficient, 'kyy': b_elem.kyy.coefficient, 'kxy': b_elem.kxy.
        coefficient, 'kyx': b_elem.kyx.coefficient, 'cyy': b_elem.cyy.
        coefficient, 'cxy': b_elem.cxy.coefficient, 'cyx': b_elem.cyx.
        coefficient, 'frequency': b_elem.frequency}
    return data
