title: iloc giving 'IndexError: single positional indexer is out-of-bounds'
body: <p>I am trying to encode some information to read into a Machine Learning model using the following </p>
  
  <pre><code>import numpy as np
  import pandas as pd
  import matplotlib.pyplot as py
  
  Dataset = pd.read_csv('filename.csv', sep = ',')
  
  X = Dataset.iloc[:,:-1].values
  Y = Dataset.iloc[:,18].values
  
  from sklearn.preprocessing import LabelEncoder, OneHotEncoder
  labelencoder_X = LabelEncoder()
  X[:, 0] = labelencoder_X.fit_transform(X[:, 0])
  onehotencoder = OneHotEncoder(categorical_features = [0])
  X = onehotencoder.fit_transform(X).toarray()
  </code></pre>
  
  <p>however I am getting an error that reads</p>
  
  <pre><code>IndexError: single positional indexer is out-of-bounds
  </code></pre>