sevnpy.io.regex_dataframe_from_string
- sevnpy.io.regexutility.regex_dataframe_from_string(string: str, matchexpr: str, columns: List[str], columns_type: List[str] | None = None) DataFrame[source]
Apply a regex match to a string and store the captured values to a pandas DataFrame
- Parameters:
string – string 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