piel.tools.openlane.parse.utils#

Module Contents#

Functions#

contains_in_lines(file_lines_data, keyword)

Check if the keyword is contained in the file lines

create_file_lines_dataframe(file_lines_raw)

Create a DataFrame from the raw lines of a file

get_file_line_by_keyword(file_lines_data, keyword, regex)

Extract the data from the file lines using the given keyword and regex

read_file_lines(file_path)

Extract lines from the file

contains_in_lines(file_lines_data: pandas.DataFrame, keyword: str)[source]#

Check if the keyword is contained in the file lines

Parameters:
  • file_lines_data (pd.DataFrame) – Dataframe containing the file lines

  • keyword (str) – Keyword to search for

Returns:

Dataframe containing the file lines

Return type:

file_lines_data (pd.DataFrame)

create_file_lines_dataframe(file_lines_raw)[source]#

Create a DataFrame from the raw lines of a file

Parameters:

file_lines_raw (list) – list containing the file lines

Returns:

Dataframe containing the file lines

Return type:

file_lines_data (pd.DataFrame)

get_file_line_by_keyword(file_lines_data: pandas.DataFrame, keyword: str, regex: str)[source]#

Extract the data from the file lines using the given keyword and regex

Parameters:
  • file_lines_data (pd.DataFrame) – Dataframe containing the file lines

  • keyword (str) – Keyword to search for

  • regex (str) – Regex to extract the data

Returns:

Dataframe containing the extracted values

Return type:

extracted_values (pd.DataFrame)

read_file_lines(file_path: str | pathlib.Path)[source]#

Extract lines from the file

Parameters:

file_path (str | pathlib.Path) – Path to the file

Returns:

list containing the file lines

Return type:

file_lines_raw (list)