code: def pca_prostate():
      print("Importing prostate.csv data...\n")
      prostate = h2o.upload_file(
          pyunit_utils.locate("smalldata/logreg/prostate.csv")
      )
  
      print(
          "Converting CAPSULE, RACE, DPROS and DCAPS columns to factors"
      )
      prostate["CAPSULE"] = prostate["CAPSULE"].asfactor()
      prostate["RACE"] = prostate["RACE"].asfactor()
      prostate["DPROS"] = prostate["DPROS"].asfactor()
      prostate["DCAPS"] = prostate["DCAPS"].asfactor()
      prostate.describe()
  
      print(
          "PCA on columns 3 to 9 with k = 3, retx = FALSE, transform = 'STANDARDIZE'"
      )
  
      fitPCA = H2OPCA(k=3, transform="NONE", pca_method="Power")
      fitPCA.train(x=list(range(2, 9)), training_frame=prostate)
      pred = fitPCA.predict(prostate)
  
      print("Projection matrix:\n")
      pred.head()
  
imports: from builtins import range
  import sys
  import h2o
  from tests import pyunit_utils
  from h2o.estimators.pca import H2OPrincipalComponentAnalysisEstimator
label_desc: Use image node_id 1 for calling a global function with example usage: pca_prostate() without return types