title: Panda .loc or .iloc to select the columns from a dataset
body: <p>I have been trying to select a particular set of columns from a dataset for all the rows. I tried something like below.</p>
  
  <pre><code>train_features = train_df.loc[,[0,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]]
  </code></pre>
  
  <p>I want to mention that all rows are inclusive but only need the numbered columns.
  Is there any better way to approach this.</p>
  
  <p>sample data:</p>
  
  <pre><code>age  job        marital   education    default   housing   loan   equities   contact     duration   campaign   pdays   previous   poutcome   emp.var.rate   cons.price.idx   cons.conf.idx   euribor3m     nr.employed   y
  56   housemaid  married   basic.4y     1         1         1      1          0           261        1          999     0          2          1.1            93.994           -36.4           3.299552287   5191          1
  37   services   married   high.school  1         0         1      1          0           226        1          999     0          2          1.1            93.994           -36.4           0.743751247   5191          1
  56   services   married   high.school  1         1         0      1          0           307        1          999     0          2          1.1            93.994           -36.4           1.28265179    5191          1
  </code></pre>
  
  <p>I'm trying to neglect job, marital, education and y column in my dataset. y column is the target variable.</p>