title: Python Pandas Drop Dataframe
body: <p>How do I delete a column from a DataFrame? I know this data is not reproducible as I have a CSV file and I am trying to build a pandas data frame to do some wrangling.</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  import matplotlib.pyplot as plt
  
  df = pd.read_csv('C:\LoadProfiles\CSV\WillBaySchl 2013_2014 KW.csv')
  
  print(df)
  </code></pre>
  
  <p>This will return the head/tail and:<code>[34944 rows x 3 columns]</code>    </p>
  
  <pre><code>pos0 = 0
  pos1 = 1
  pos2 = 2
  
  colname = df.columns[pos0]
  print(colname)
  </code></pre>
  
  <p>This will return: <code>Meter ID</code> (I want to drop this column/dataframe)    </p>
  
  <pre><code>colname = df.columns[pos1]
  print(colname)
  </code></pre>
  
  <p>This will return: <code>Date / Time</code> (I want this to be the pd data frame index)</p>
  
  <pre><code>colname = df.columns[pos2]
  print(colname)
  </code></pre>
  
  <p>This will return: <code>KW(ch: 1  set:0)</code> (This is the data that I want to rename "kW" and do some wrangling...)</p>
  
  <p>If I try this code below:</p>
  
  <pre><code>df = pd.DataFrame.drop(['Meter ID'], axis=1)
  
  print(df)
  </code></pre>
  
  <p>Python will return the error:<code>TypeError: drop() missing 1 required positional argument: 'labels'</code></p>
  
  <p>If I try this code below:     </p>
  
  <pre><code>df = pd.DataFrame.drop(columns=['Meter ID'])
  print(df)
  </code></pre>
  
  <p>Python will return the error: <code>TypeError: drop() got an unexpected keyword argument 'columns'</code></p>
  
  <p>Any help is greatly appreciated...</p>