Remap values in pandas column with a dict, preserve NaNs August 22, 2022 by Magenaut I have a dictionary which looks like this: di = {1: "A", 2: "B"}