title: How to merge a pandas df with a geopandas df for plotting on a shapefile
body: <p>I am playing with the following shapefile that can be found <a href="https://github.com/joncutrer/geopandas-tutorial/tree/master/data" rel="nofollow noreferrer">here on Github</a>. I'm not going to include the output but here is the code that reads it in as a geopandas df and plots the shapefile.</p>
  <pre><code>states = geopandas.read_file('usa-states-census-2014.shp')
  states.head()
  
  states.plot()
  </code></pre>
  <p>I also have the following df, which is the <code>USArrests</code> dataset which can be found <a href="https://www.kaggle.com/deepakg/usarrests" rel="nofollow noreferrer">here on Kaggle</a>.</p>
  <p>What I am trying to do is merge the two datasets so I can plot the shapefile with a colormap of the features in <code>USArrests</code>. I ran the following code to merge the datasets.</p>
  <pre><code>df = pd.read_csv(&quot;USArrests.csv&quot;)
  df.rename(columns = {'Unnamed: 0':'NAME'}, inplace = True)
  merged = pd.merge(df, states, on=['NAME']).drop_duplicates(subset=['NAME'])
  </code></pre>
  <p>The merge worked, but now when I run <code>states.plot()</code> I get a line plot, and I'm assuming this is because the df is no longer a <code>GeoDataFrame</code>.</p>
  <p>My quesiton is, how can I take the data from <code>USArrests</code> and use it to plot a colormap over the shapefile? Thanks!</p>
  <p>Note, I am using the following <a href="https://jcutrer.com/python/learn-geopandas-plotting-usmaps" rel="nofollow noreferrer">guide</a> to help me but it doesn't cover my specific task</p>