code: def run_LDA(df):
      
      # Prep variables for sklearn LDA
      X = df.iloc[:, 1:df.shape[1]].values     # input data matrix
      y = df["Condition"].values               # data categories list
  
      # Calculate LDA
      sklearn_lda = LDA()
      X_lda_sklearn = sklearn_lda.fit_transform(X, y)
      try:
          exp_var = sklearn_lda.explained_variance_ratio_
      except AttributeError as ae:
          print("\n{}: explained variance cannot be computed.\nPlease check this GitHub PR:"
                " https://github.com/scikit-learn/scikit-learn/pull/6027".format(ae))
          return X_lda_sklearn, y, "NA"
      return X_lda_sklearn, y, exp_var
docs: Run LinearDiscriminantAnalysis on input dataframe (df) and return
      transformed data, scalings and explained variance by discriminants.