polars icon indicating copy to clipboard operation
polars copied to clipboard

Documentation for pattern parameter in str.extract

Open drtingtp opened this issue 1 year ago • 0 comments

This is more of an documentation enhancement than bug.

Referring to documentation of polars.Expr.str.extract, I would like to propose mentioning capture groups in the pattern parameter.

"A valid regular expression pattern" does not seem to be sufficient for the context of this API. Took me a bit of time to figure out the nulls I am getting while trying to use this API - I needed a capture group for the supplied regex pattern.

Relevant APIs: polars.Expr.str.extract_all, polars.Expr.str.extract_groups

drtingtp avatar Jan 09 '24 04:01 drtingtp