original_docstring: 
      Receiver a dataset of features
  
      Return:
          Print of variance_ratio_ in percent
      
docstring: Receiver a dataset of features
  Return:
  Print of variance_ratio_ in percent
docstring_tokens: Receiver a dataset of features Return : Print of variance_ratio_ in percent
code: def applyPCA(df):
      """
      Receiver a dataset of features
  
      Return:
          Print of variance_ratio_ in percent
      """
  
      columns = df.columns
      scaler = StandardScaler()  
      pca = PCA()
       
      scaler.fit(df)
      df = scaler.transform(df)
      
      pca.fit(df)
      x_pca = pca.transform(df)
      p = pca.explained_variance_ratio_
      result = {}
      for key, perc in zip(columns, p):
          result[key] = "{:.2f}%".format(perc*100)
      
      pp = pprint.PrettyPrinter(indent=4)
      pp.pprint(result)
code_tokens: def applyPCA ( df ) : columns = df . columns scaler = StandardScaler ( ) pca = PCA ( ) scaler . fit ( df ) df = scaler . transform ( df ) pca . fit ( df ) x_pca = pca . transform ( df ) p = pca . explained_variance_ratio_ result = { } for key , perc in zip ( columns , p ) : result [ key ] = "{:.2f}%" . format ( perc * 100 ) pp = pprint . PrettyPrinter ( indent = 4 ) pp . pprint ( result )
short_docstring: Receiver a dataset of features
  Return:
  Print of variance_ratio_ in percent
short_docstring_tokens: Receiver a dataset of features Return : Print of variance_ratio_ in percent
comment: """
      Receiver a dataset of features
  
      Return:
          Print of variance_ratio_ in percent
      """