title: convert data that is in the form of object in a csv to a pivot
body: <p>I have a file that is not beautiful and searchable so i downloaded it in the csv format. It contains 4 columns and 116424 rows.
  I'm not able to plot its three columns namely Year, Age and Ratio onto a heat map.
  The link for the csv file is:  <a href="https://gist.github.com/JustGlowing/1f3d7ff0bba7f79651b00f754dc85bf1" rel="nofollow noreferrer">https://gist.github.com/JustGlowing/1f3d7ff0bba7f79651b00f754dc85bf1</a></p>
  
  <pre><code>import numpy as np
  import pandas as pd
  from pandas import DataFrame
  from numpy.random import randn
  from scipy import stats
  import matplotlib.pyplot as plt
  import seaborn as sns
  
  df = pd.read_csv('new_file.csv')
  print(df.info())
  print(df.shape)
  couple_columns = df[['Year','Age','Ratio']]
  print(couple_columns.head())
  </code></pre>
  
  <p>Error    </p>
  
  <p>C:\Users\Pranav\AppData\Local\Programs\Python\Python36-32\python.exe C:/Users/Pranav/PycharmProjects/takenmind/Data_Visualization/a1.py
  
  Traceback (most recent call last):
  RangeIndex: 116424 entries, 0 to 116423
    File "C:/Users/Pranav/PycharmProjects/takenmind/Data_Visualization/a1.py", line 12, in 
  Data columns (total 4 columns):
      couple_columns = df[['Year','Age','Ratio']]
  AREA     116424 non-null object
    File "C:\Users\Pranav\AppData\Roaming\Python\Python36\site-packages\pandas\core\frame.py", line 2682, in <strong>getitem</strong>
  YEAR     116424 non-null int64
  AGE      116424 non-null object
  RATIO    116424 non-null object
  dtypes: int64(1), object(3)
  memory usage: 2.2+ MB
  None
  (116424, 4)
      return self._getitem_array(key)
    File "C:\Users\Pranav\AppData\Roaming\Python\Python36\site-packages\pandas\core\frame.py", line 2726, in _getitem_array
      indexer = self.loc._convert_to_indexer(key, axis=1)
    File "C:\Users\Pranav\AppData\Roaming\Python\Python36\site-packages\pandas\core\indexing.py", line 1327, in _convert_to_indexer
      .format(mask=objarr[mask]))
  KeyError: "['Year' 'Age' 'Ratio'] not in index"</p>