title: Difficulty producing a simple scatter plot from csv file in python: x and y axis labeling
body: <p>I find it difficult to produce a simple scatter plot from csv file in python. I'm new to python and not sure how I'm supposed to label my x and y axises</p>
  
  <p>My data has several columns: Country, 2002, 2007, 2012, 10 Year Net<br>
  Under country, there is a list of countries. Under 2002, 2007 and 2012 are net migration figures corresponding to those years. 10 Year Net has the 10 year net migration for years 2002-2012.</p>
  
  <p>My code is as follows:</p>
  
  <pre><code>%matplotlib inline
  import pandas as pd
  import matplotlib.pyplot as plt
  df  = pd.read_csv("../input/UNdata_Export_20170112_044235144.csv")
  df.plot()  # plots all columns against index
  df.plot(kind='scatter',x='x',y='y') # scatter plot
  df.plot(kind='density')  # estimate density function
  # df.plot(kind='hist')  # histogram
  </code></pre>
  
  <p>When I run it I get the following errors:</p>
  
  <pre><code>KeyError: 'x'
  ---------------------------------------------------------------------------
  KeyError                                  Traceback (most recent call last)
  /opt/conda/lib/python3.5/site-packages/pandas/indexes/base.py in get_loc(self, key, method, tolerance)
     2133             try:
  -&gt; 2134                 return self._engine.get_loc(key)
     2135             except KeyError:
  
  pandas/index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:4433)()
  
  pandas/index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:4279)()
  
  pandas/src/hashtable_class_helper.pxi in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:13742)()
  
  pandas/src/hashtable_class_helper.pxi in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:13696)()
  
  KeyError: 'x'
  
  During handling of the above exception, another exception occurred:
  
  KeyError                                  Traceback (most recent call last)
  &lt;ipython-input-1-95582c0a0754&gt; in &lt;module&gt;()
        4 df  = pd.read_csv("../input/UNdata_Export_20170112_044235144.csv")
        5 df.plot()  # plots all columns against index
  ----&gt; 6 df.plot(kind='scatter',x='x',y='y') # scatter plot
        7 df.plot(kind='density')  # estimate density function
        8 # df.plot(kind='hist')  # histogram
  
  /opt/conda/lib/python3.5/site-packages/pandas/tools/plotting.py in __call__(self, x, y, kind, ax, subplots, sharex, sharey, layout, figsize, use_index, title, grid, legend, style, logx, 
  </code></pre>
  
  <p>How do I assign x and y values OR where do I go from here? I'm just trying to do a few simple graphics. Thanks! - robbie</p>