I ran into a problem like this using series = series.replace(dictionary) where the replacement values were {string: float}. But the future warning stopped happening when I changed it to series = series.replace(dictionary).astype(float)