rcx_tk.io ========= .. py:module:: rcx_tk.io Functions --------- .. autoapisummary:: rcx_tk.io.read_file rcx_tk.io.save_dataframe_as_tsv Module Contents --------------- .. py:function:: read_file(file_path: str, **kwargs) -> pandas.DataFrame Imports the metadata file to pandas dataframe. :param file_path: The path to the input data. :type file_path: str :param kwargs: Variable keyword arguments to pass to the pd.read_ style functions :raises ValueError: Error if any file format except for csv, xls, xlsx, txt or tsv is provided. :returns: Dataframe containing the metadata. :rtype: pd.DataFrame .. py:function:: save_dataframe_as_tsv(df: pandas.DataFrame, file_path: str, header: bool = True, index: bool = False, mode: str = 'w') -> None Saves the dataframe as a TSV file. :param df: The metadata dataframe. :type df: pd.DataFrame :param file_path: A path where the .TSV will be exported, containing the .TSV. :type file_path: str :param header: Whether to write the header or not. :type header: bool :param index: Whether to write the index or not. :type index: bool :param mode: Mode in which to open the file - one of w or a. :type mode: str :raises ValueError: Error if provided is of a different format than TSV.