Pandas Keyerror
#### A small, complete example of the issue

```start_time = timeit.default_timer()
np.set_printoptions(suppress=True)

df=pd.read_csv('/Users/sudarshan/Desktop/masterproject/SampleDatasets/dataset3.csv')
print (df.isnull().any())
df.dropna(inplace=True)
print (df.isnull().any())
#df= df.fillna(lambda x: x.median())
just_dummies = df['Flags'].str.get_dummies(sep='|')

dfMod = pd.concat([df, just_dummies], axis=1) 
print dfMod.head()
print(dfMod.columns.tolist())
dfMod['A'] = dfMod['A'].astype(float)
dfMod['C'] = dfMod['C'].astype(float)
dfMod['E'] = dfMod['E'].astype(float)
dfMod['F'] = dfMod['F'].astype(float)
dfMod['P'] = dfMod['P'].astype(float)
dfMod['R'] = dfMod['R'].astype(float)
dfMod['S'] = dfMod['S'].astype(float)


print(dfMod.columns.tolist())
#print (df.head())
#le = preprocessing.LabelEncoder()
#le.fit(df['Flags'])
#print le.classes_
#df['Flags']=le.transform(df['Flags'])
#print (df.head())
X = df.as_matrix(columns=['Packets','Bytes','Duration','A','C','E','F','P','R','S'])
X[ ~np.isfinite(X) ] = 0
print "converted into matrix"
print X[0:5,:]
print (np.any(np.isnan(X)))

y = df['Type']

scaler = preprocessing.StandardScaler().fit(X)
standardized_X= Imputer().fit_transform(X)
print standardized_X

```
Traceback (most recent call last):
  File "randomforest5changingflags.py", line 36, in <module>
    dfMod['C'] = dfMod['C'].astype(float)
  File "/Users/sudarshan/anaconda3/lib/python2.7/site-packages/pandas/core/frame.py", line 2056, in __getitem__
    return self._getitem_column(key)
  File "/Users/sudarshan/anaconda3/lib/python2.7/site-packages/pandas/core/frame.py", line 2063, in _getitem_column
    return self._get_item_cache(key)
  File "/Users/sudarshan/anaconda3/lib/python2.7/site-packages/pandas/core/generic.py", line 1385, in _get_item_cache
    values = self._data.get(item)
  File "/Users/sudarshan/anaconda3/lib/python2.7/site-packages/pandas/core/internals.py", line 3515, in get
    loc = self.items.get_loc(item)
  File "/Users/sudarshan/anaconda3/lib/python2.7/site-packages/pandas/indexes/base.py", line 2091, in get_loc
    return self._engine.get_loc(self._maybe_cast_indexer(key))
  File "pandas/index.pyx", line 138, in pandas.index.IndexEngine.get_loc (pandas/index.c:4149)
  File "pandas/index.pyx", line 160, in pandas.index.IndexEngine.get_loc (pandas/index.c:4013)
  File "pandas/src/hashtable_class_helper.pxi", line 732, in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:13161)
  File "pandas/src/hashtable_class_helper.pxi", line 740, in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:13115)
KeyError: 'C'

#### Expected Output

#### Output of ``pd.show_versions()``

<details>
# Paste the output here pd.show_versions() here

</details>
Python 2.7 using pandas 0.19.1rc version