class_docstr: Dimension reduction model, such as PCA or GLRM.
class_docstr_tok: ["Dimension","reduction","model",",","such","as","PCA","or","GLRM","."]
docstr: Return the Importance of components associated with a PCA model.
  
  :param bool use_pandas: If ``True``, then the variable importances will be returned as a pandas data frame. (Default: ``False``)
docstr_tok: ["Return","the","Importance","of","components","associated","with","a","PCA","model",".",":","param","bool","use_pandas",":","If","``","True","``",",","then","the","variable","importances","will","be","returned","as","a","pandas","data","frame",".","(","Default",":","``","False","``",")"]
code: def varimp(self, use_pandas=False):
      """
      Return the Importance of components associated with a PCA model.
  
      :param bool use_pandas: If ``True``, then the variable importances will be returned as a pandas data frame. (Default: ``False``)
      """
      model = self._model_json["output"]
      if "importance" in list(model.keys()) and model["importance"]:
          vals = model["importance"].cell_values
          header = model["importance"].col_header
          if use_pandas and can_use_pandas():
              import pandas
  
              return pandas.DataFrame(vals, columns=header)
          else:
              return vals
      else:
          print(
              "Warning: This model doesn't have importances of components."
          )
  
file_path: h2o-3/h2o-py/h2o/model/models/dim_reduction.py
imports: import h2o
  from h2o.model import ModelBase
  from h2o.plot import decorate_plot_result, get_matplotlib_pyplot, RAISE_ON_FIGURE_ACCESS
  from h2o.utils.compatibility import *
  from h2o.utils.shared_utils import can_use_pandas
label_desc: Use image node_id 1 for calling the H2ODimReductionModel obj's underlying member method code with example usage: obj.varimp(use_pandas) and returns: pandas, vals