title: How to fix the below python 3.6 error function' object has no attribute data?
body: <p>While i am running the below code i have seeing the error "'function' object has no attribute 'data'". Please help me how to fix it. I have python 3.6.</p>
  
  <pre><code>   import numpy as np
  from sklearn.datasets import load_digits
  
  digits = load_digits
  
  from sklearn.model_selection import StratifiedKFold
  folds = StratifiedKFold(n_splits=3)
  
  scores_logistic = []
  scores_svm = []
  scores_rf = []
  
  for train_index, test_index in kf.split(digits.data):
      X_train, X_test, y_train, y_test = digits.data[train_index], digits.data[test_index], \
                                         digits.target[train_index], digits.target[test_index]
      scores_logistic.append(get_score(LogisticRegression(), X_train, X_test, y_train, y_test))  
      scores_svm.append(get_score(SVC(), X_train, X_test, y_train, y_test))
      scores_rf.append(get_score(RandomForestClassifier(n_estimators=40), X_train, X_test, y_train, y_test))
  </code></pre>