Skip to content

Commit

Permalink
Merge pull request #21 from sumeshi/feature/v0.4.2
Browse files Browse the repository at this point in the history
fix: replace to replace_all
  • Loading branch information
sumeshi authored Jan 24, 2025
2 parents ff77d80 + f2442a8 commit b3251e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "qsv"
version = "0.4.1"
version = "0.4.2"
description = "A tool that provides elastic and rapid filtering for efficient analysis of huge CSV files, such as eventlogs."
readme = "README.md"
authors = [
Expand Down
2 changes: 1 addition & 1 deletion src/qsv/operations/chainables/sed.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ def sed(df: pl.LazyFrame, colname: str, pattern: str, replacement: str, ignoreca
LogController.debug(f"sed condition: {pattern} on {colname}")
pattern = pattern if type(pattern) is str else str(pattern)
return df.with_columns(
pl.col(colname).cast(pl.String).str.replace(f"(?i){pattern}", replacement) if ignorecase else pl.col(colname).cast(pl.String).str.replace(pattern, replacement)
pl.col(colname).cast(pl.String).str.replace_all(f"(?i){pattern}", replacement) if ignorecase else pl.col(colname).cast(pl.String).str.replace_all(pattern, replacement)
)

0 comments on commit b3251e0

Please sign in to comment.