Feature Type
-
[x] Adding new functionality to pandas
-
[X] Changing existing functionality in pandas
-
[ ] Removing existing functionality in pandas
Problem Description
I wish I could change the regex engine that pandas internally uses (python's native re
module) in string methods to an engine that other libraries have - For example, regex
PyPI link.
I want to switch to regex
or other regex engine because re
has some limitations. Refer this answer.
Feature Description
Currently, below is possible:
df['col'].str.match(pattern, x)
To use regex
instead of re
, I know that I can do something like below:
df['col'].apply(lambda x: regex.match(pattern, x))
But I don't want to loose pandas' string methods because they are vectorized and that's what make them pretty fast.
Alternative Solutions
Not sure about any alternatives here.
Additional Context
No response
Comment From: mroeschke
Thanks but this is a duplicate of https://github.com/pandas-dev/pandas/issues/22496