Skip to content

grep function for DataFrame #11

@stdiff

Description

@stdiff

If you have a column of str and want to filter the rows with a specified expression, then you can select the rows in an easy way. Namely we want to have a short cut to the following logic.

s_matched = data[col].apply(lambda s: True if re.search(expr,s) else False)
return data[s_matched].copy()

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions