BUG/CLN: remove infer_types
BUG: fix bug with replace when a compiled regex was passed but regex=False