core.table

core.table.read_csv(path: str | Path, **kwargs) DataFrame[source]

Function to read csv file without taking care of tabulation and whitespaces

Parameters:
  • path (str | Path) – Path of csv file

  • kwargs – Keyword arguments of read_csv function from pandas

Returns:

Output table in pandas DataFrame format

Return type:

DataFrame

core.table.read_xml(path: str | Path) dict[source]

Function to read xml file

Parameters:

path (str | Path) – Path of xml file

core.table.select(table, where: tuple, cols: str | list = None)[source]

Selection function in a pandas DataFrame with a condition

Parameters:
  • dataframe (pd.DataFrame) – Input table from which to select

  • where (tuple) – Condition to use for the selection

  • cols (str | list) – Name of the columns to return

Example

select(df, (‘col_1’,’=’,20), [‘col_2’,’col_3’])

core.table.select_cell(table, where: tuple, col: str)[source]

Function for selecting a single cell value in a pandas DataFrame with a condition

Parameters:
  • dataframe (pd.DataFrame) – Input table from which to select

  • where (tuple) – Condition to use for the selection

  • col (str | list) – Name of the column to return

Example

select_cell(df, (‘col_1’,’=’,20), ‘col_2’)