[FEA] replace(): regex parameter is not implemented yet
- Dominant language
- C++
- Stars
- 9.8k
- Forks
- 1.1k
- Avg merge
- 3d 6m
- Merged PRs (30d)
- 278
Description
**Is your feature request related to a problem? Please describe.**
writing code with `import cudf as pd`
**Describe the solution you'd like**
```
In [1]: import cudf as pd
In [2]: df = pd.DataFrame({'a': ['abc','bcd','cde']})
In [3]: df.replace('c', 'C', regex=True)
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
Cell In [3], line 1
----> 1 df.replace('c', 'C', regex=True)
File ~/.local/lib/python3.9/site-packages/nvtx/nvtx.py:101, in annotate.__call__..inner(*args, **kwargs)
98 @wraps(func)
99 def inner(*args, **kwargs):
100 libnvtx_push_range(self.attributes, self.domain.handle)
--> 101 result = func(*args, **kwargs)
102 libnvtx_pop_range(self.domain.handle)
103 return result
File ~/.local/lib/python3.9/site-packages/cudf/core/indexed_frame.py:744, in IndexedFrame.replace(self, to_replace, value, inplace, limit, regex, method)
741 raise NotImplementedError("limit parameter is not implemented yet")
743 if regex:
--> 744 raise NotImplementedError("regex parameter is not implemented yet")
746 if method not in ("pad", None):
747 raise NotImplementedError(
748 "method parameter is not implemented yet"
749 )
NotImplementedError: regex parameter is not implemented yet
In [4]: df.to_pandas().replace('c', 'C', regex=True)
Out[4]:
a
0 abC
1 bCd
2 Cde
In [5]: pd.__version__
Out[5]: '22.12.0'
```
Contributor guide
Assessment
This issue has not been assessed yet.