title: Error in function return using python
body: <p>def random_model_predictions(droping, features):
      # Fitting a model</p>
  
  <pre><code>df_telecom_train, df_telecom_test = train_test_split(droping, test_size=0.25)
  
  ############## Random Forest Classifier ##############
  
  
  # Set up our RandomForestClassifier instance and fit to data
  
  clf = RandomForestClassifier(n_estimators=30)
  clf = clf.fit(df_telecom_train[features], df_telecom_train["Churn"])
  print(clf)
  
  # Make predictions
  
  prediction1 = clf.predict(df_telecom_test[features])
  print(prediction1)
  
  probs = clf.predict_proba(df_telecom_test[features])
  print(probs)
  
  # Accuracy
  
  score1 = clf.score(df_telecom_test[features], df_telecom_test["Churn"])
  print("Accuracy: ", score1)
  
  # Confusion matrix
  
  confusion_matrix1 = pd.DataFrame(
      confusion_matrix(df_telecom_test["Churn"], prediction1),
      columns=["Predicted False", "Predicted True"],
      index=["Actual False", "Actual True"]
  )
  print(confusion_matrix1)
  
  return df_telecom_test
  
  return df_telecom_train
  
  return probs
  
  return clf
  </code></pre>
  
  <p>def logistic_model_prediction(df_telecom_train, features, df_telecom_test):</p>
  
  <pre><code>#############Logistic Regression############
  
  # Import Library
  
  from sklearn.linear_model import LogisticRegression
  
  # Create logistic regression object
  
  model2 = LogisticRegression()
  
  # Train the model using the training sets and check score
  
  model2.fit([features], df_telecom_train["Churn"])
  score2 = model2.score(df_telecom_train[features], df_telecom_train["Churn"])
  print("Accuracy: ", score2)
  
  # Equation coefficient and Intercept
  
  print('Coefficient: \n', model2.coef_)
  print('Intercept: \n', model2.intercept_)
  
  # Predict Output
  
  prediction2 = model2.predict(df_telecom_test[features])
  print(prediction2)
  
  # Confusion matrix
  
  confusion_matrix2 = pd.DataFrame(
      confusion_matrix(df_telecom_test["Churn"], prediction2),
      columns=["Predicted False", "Predicted True"],
      index=["Actual False", "Actual True"]
  )
  print(confusion_matrix2)
  </code></pre>
  
  <p>if <strong>name</strong> == '<strong>main</strong>':
      df_telecom_test, df_telecom_train, probs, clf = 
      random_model_predictions(droping, features)
      logistic_model_prediction(df_telecom_train, features, df_telecom_test)</p>
  
  <p>While im using 2 or more return type , it is showing this type of error </p>
  
  <p>ValueError: Must pass DataFrame with boolean values only</p>