title: AttributeError: 'numpy.ndarray' object has no attribute 'columns'
body: <p>I'm trying to create a function to remove the features that are highly correlated with each other. However, I am getting the error  <code>''AttributeError: 'numpy.ndarray' object has no attribute 'columns'   '' ...</code></p>
  
  <p>I just want to call pandas to read columns number. What can I do next?</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  
  def remove_features_identical(DataFrame,data_source):
      n=len(DataFrame.columns)
      print 'dealing with %d features of %s data......... \n' % (n,data_source)
      remove_ind = []
      R = np.corrcoef(DataFrame.T)
      for i in range(n-1):
          for j in range(i+1,n):
              if R[i,j]==1:
                  remove_ind.append(j)    
  
      DataFrame.drop(remove_ind, axis=1, inplace=True)
      DataFrame.drop(remove_ind, axis=1, inplace=True)
      print ('deleting %d columns with correration factor &gt;0.99') % ( len(remove_ind))
      return DataFrame
  
  if __name__ == "__main__":
      # load data and initialize y and x from train set and test set
      df_train = pd.read_csv('train.csv')
      df_test = pd.read_csv('test.csv')
      y_train=df_train['TARGET'].values
      X_train =df_train.drop(['ID','TARGET'], axis=1).values
      y_test=[]
      X_test = df_test.drop(['ID'], axis=1).values
  
      # delete identical feartures in raw data
      X_train = remove_features_identical(X_train,'train set')
      X_test = remove_features_identical(X_test,'test set')
  </code></pre>