Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Add str.extract() function #2020

Merged
merged 4 commits into from
Mar 21, 2024
Merged

[FEAT] Add str.extract() function #2020

merged 4 commits into from
Mar 21, 2024

Conversation

colin-ho
Copy link
Contributor

@colin-ho colin-ho commented Mar 18, 2024

str.extract(pattern: str | Expression, index : int) Extracts the regex match group from each string in a string column. If index is 0, the entire match is returned, otherwise the specified group is returned.

https://ibis-project.org/reference/expression-strings#ibis.expr.types.strings.StringValue.re_extract

@github-actions github-actions bot added the enhancement New feature or request label Mar 18, 2024
Copy link

codecov bot commented Mar 18, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 84.72%. Comparing base (e96266d) to head (fac2c2a).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2020      +/-   ##
==========================================
+ Coverage   84.68%   84.72%   +0.03%     
==========================================
  Files          62       62              
  Lines        6779     6787       +8     
==========================================
+ Hits         5741     5750       +9     
+ Misses       1038     1037       -1     
Files Coverage Δ
daft/expressions/expressions.py 91.62% <100.00%> (+0.05%) ⬆️
daft/series.py 92.98% <80.00%> (-0.15%) ⬇️

... and 1 file with indirect coverage changes

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Mar 18, 2024
@colin-ho colin-ho marked this pull request as ready for review March 18, 2024 17:21
Copy link
Member

@kevinzwang kevinzwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments but overall code looks good!

daft/expressions/expressions.py Show resolved Hide resolved
src/daft-core/src/array/ops/utf8.rs Show resolved Hide resolved
docs/source/api_docs/expressions.rst Show resolved Hide resolved
@colin-ho colin-ho merged commit 15c8ce3 into main Mar 21, 2024
31 checks passed
@colin-ho colin-ho deleted the colin/regex_extract branch March 21, 2024 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants