pandas.api.types.
is_re
Check if the object is a regex pattern instance.
Whether obj is a regex pattern.
Examples
>>> is_re(re.compile(".*")) True >>> is_re("foo") False