Answers for "use a dictionary to make a column of values"

0

use a dictionary to make a column of values

df['col1'].map(di)       # note: if the dictionary does not exhaustively map all
                         # entries then non-matched entries are changed to NaNs
Posted by: Guest on October-30-2021

Code answers related to "use a dictionary to make a column of values"

Python Answers by Framework

Browse Popular Code Answers by Language