BUG: Series.str.replace/translate
resulting dtype is different from pandas if an invalid pattern was passed
#5970
Labels
bug 🦗
Something isn't working
P2
Minor bugs or low-priority feature requests
pandas concordance 🐼
Functionality that does not match pandas
Modin version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest released version of Modin.
I have confirmed this bug exists on the main branch of Modin. (In order to do this you can follow this guide.)
Reproducible Example
Issue Description
Here we pass
None
as a pattern that produces a Series full of nans as the result (instead of expected Series of strings):Modin can't infer new dtype dynamically and just copies it:
modin/modin/core/storage_formats/pandas/query_compiler.py
Line 1601 in 7a95be2
(Everything works well if the pattern is not None)
Expected Behavior
To match pandas behavior
Error Logs
Installed Versions
Replace this line with the output of pd.show_versions()
--
Note: this issue is part of an epic #3804
The text was updated successfully, but these errors were encountered: