<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Title
Step1:  Create dataframe
Step2:  Create a dictionary of values
Step3:  Map the values of the city_to_state dictionary to the values in the city variable
<ASSISTANT_TASK:>
Python Code:
import pandas as pd
Explanation: Title: Map External Values To Dataframe Values in Pandas
Slug: pandas_map_values_to_values
Summary: Map External Values To Dataframe Values in Pandas
Date: 2016-05-01 12:00
Category: Python
Tags: Data Wrangling
Authors: Chris Albon  
import modules
End of explanation
raw_data = {'first_name': ['Jason', 'Molly', 'Tina', 'Jake', 'Amy'], 
        'last_name': ['Miller', 'Jacobson', 'Ali', 'Milner', 'Cooze'], 
        'age': [42, 52, 36, 24, 73], 
        'city': ['San Francisco', 'Baltimore', 'Miami', 'Douglas', 'Boston']}
df = pd.DataFrame(raw_data, columns = ['first_name', 'last_name', 'age', 'city'])
df
Explanation: Create dataframe
End of explanation
city_to_state = { 'San Francisco' : 'California', 
                  'Baltimore' : 'Maryland', 
                  'Miami' : 'Florida', 
                  'Douglas' : 'Arizona', 
                  'Boston' : 'Massachusetts'}
Explanation: Create a dictionary of values
End of explanation
df['state'] = df['city'].map(city_to_state)
df
Explanation: Map the values of the city_to_state dictionary to the values in the city variable
End of explanation
<END_TASK>