parse
parse copied to clipboard
Usage with pandas df.str.extract and .match?
I have several large DataFrames I need to apply regex to. From what I understand, parse
uses compiled regexes internally, therefore it should be possible to use them with pandas
. But when writing something like
extracted = df.mycolumn.str.extract(parse.compile(my_regex))
pandas
throws
TypeError: first argument must be string or compiled pattern
Is the re.Pattern
in the parser.Parser
object accessible from the outside somewhere?