RIAssigner.data.PandasData

Classes

PandasData

Class to handle data from filetypes which can be imported into a pandas dataframe.

Module Contents

class RIAssigner.data.PandasData.PandasData(filename: str, filetype: str, rt_unit: str)[source]

Bases: RIAssigner.data.Data.Data

Class to handle data from filetypes which can be imported into a pandas dataframe.

_carbon_number_column_names[source]
_rt_key = 'rt'[source]
_read()[source]

Load content from file into PandasData object.

_read_into_dataframe() None[source]

Read the data from file into dataframe.

write(filename: str) None[source]

Write data on disk. Supports ‘csv’, ‘tsv’, ‘tabular’ and ‘parquet’ formats.

_init_carbon_number_index() None[source]

Find key of carbon number column and store it.

_init_rt_column_info() None[source]

Find key of retention time column and store it.

_init_ri_column_info() None[source]

Initialize retention index column name and set its position next to the retention time column.

_init_ri_indices() None[source]

Initialize retention indices to a factor of 100 of carbon numbers or None if carbon numbers are not present.

_sort_by_rt() None[source]

Sort peaks by their retention times.

_replace_nans_with_0s() None[source]

Replace NaN values (including blank strings and invalid values) with 0s.

__eq__(o: object) bool[source]

Comparison operator ==.

Parameters:

o (object) – Object to compare with.

Returns:

State of equality.

Return type:

bool

property retention_times: Iterable[RIAssigner.data.Data.Data.RetentionTimeType][source]

Get retention times in seconds.

property retention_indices: Iterable[RIAssigner.data.Data.Data.RetentionIndexType][source]

Get retention indices from data or computed from carbon numbers.

_ri_from_carbon_numbers() Iterable[int][source]

Returns the RI of compound based on carbon number.

property comment: Iterable[RIAssigner.data.Data.Data.CommentFieldType][source]

Get comments.

Returns:

Comments.

Return type:

Iterable[Data.CommentFieldType]