j-andrews7/kenpompy

Use of implicit RegExp in Series.str.replace is deprecated

Closed this issue · 3 comments

esqew commented

The Pandas maintainers have deprecated the use of the implicit regex=True flag for Series.str.replace in December 2020, which means a future release will break the current use without explicitly setting this flag:

The default value of regex for Series.str.replace() will change from True to False in a future release. In addition, single character regular expressions will not be treated as literal strings when regex=True is set (GH24804)

As such, calls to kenpompy methods that reply on the implicit regex=True have begun printing FutureWarnings at runtime:

/kenpompy/kenpompy/summary.py:111: FutureWarning: The default value of regex will change from True to False in a future version.

Thanks for the PRs. Don't suppose you'd like to take a crack at fixing the other FutureWarnings as well?

Lots of FutureWarning: Columnar iteration over characters will be deprecated in future releases. warnings popping, but it's a pretty easy fix (see below).

https://stackoverflow.com/questions/61313365/pandas-futurewarning-columnar-iteration-over-characters-will-be-deprecated-in-f

esqew commented

I'd love to - should have some time later today to take a crack at it.

esqew commented

As an update - just added bc1f0f6 to the PR branch which should resolve all the FutureWarnings that are popped in the test suite