RIAssigner.data.PandasData ========================== .. py:module:: RIAssigner.data.PandasData Classes ------- .. autoapisummary:: RIAssigner.data.PandasData.PandasData Module Contents --------------- .. py:class:: PandasData(filename: str, filetype: str, rt_unit: str) Bases: :py:obj:`RIAssigner.data.Data.Data` Class to handle data from filetypes which can be imported into a pandas dataframe. .. py:attribute:: _carbon_number_column_names .. py:attribute:: _rt_key :value: 'rt' .. py:method:: _read() Load content from file into PandasData object. .. py:method:: _read_into_dataframe() -> None Read the data from file into dataframe. .. py:method:: write(filename: str) -> None Write data on disk. Supports 'csv', 'tsv', 'tabular' and 'parquet' formats. .. py:method:: _init_carbon_number_index() -> None Find key of carbon number column and store it. .. py:method:: _init_rt_column_info() -> None Find key of retention time column and store it. .. py:method:: _init_ri_column_info() -> None Initialize retention index column name and set its position next to the retention time column. .. py:method:: _init_ri_indices() -> None Initialize retention indices to a factor of 100 of carbon numbers or None if carbon numbers are not present. .. py:method:: _sort_by_rt() -> None Sort peaks by their retention times. .. py:method:: _replace_nans_with_0s() -> None Replace NaN values (including blank strings and invalid values) with 0s. .. py:method:: __eq__(o: object) -> bool Comparison operator `==`. :param o: Object to compare with. :type o: object :returns: State of equality. :rtype: bool .. py:property:: retention_times :type: Iterable[RIAssigner.data.Data.Data.RetentionTimeType] Get retention times in seconds. .. py:property:: retention_indices :type: Iterable[RIAssigner.data.Data.Data.RetentionIndexType] Get retention indices from data or computed from carbon numbers. .. py:method:: _ri_from_carbon_numbers() -> Iterable[int] Returns the RI of compound based on carbon number. .. py:property:: comment :type: Iterable[RIAssigner.data.Data.Data.CommentFieldType] Get comments. :returns: Comments. :rtype: Iterable[Data.CommentFieldType]