Python Forum

Full Version: Data Frame map
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a data frame with a column called 'city' containing city names. I also have a dictionary where the keys are city names and values are corresponding states.
If we want to add a column in the original data frame containing the state corresponding to each city in 'city', How should I do it?
You need to make an attempt at this yourself and show your code before anyone will be able to help you.

See Homework and No Effort Questions