sevnpy.io.regex_from_file

sevnpy.io.regexutility.regex_from_file(filename: str, matchexpr: str, columns: List[str], columns_type: List[str] | None = None) DataFrame[source]

Apply a regex match to the content of a file and store the captured values to a pandas DataFrame

Parameters:
  • filename – file to read

  • matchexpr – regex expression to match

  • columns – name of the capturing groups from the regex match

  • columns_type – type of the capturing groups from the regex match

Returns:

matching_value – Return a pandas DataFrame storing the values matched by the regex pattern.

Return type:

pandas DataFrame