title: How to apply PCA on a dataset and print the relevant features
body: <p>I have a dataset with 23 rows and 48 columns. I am applying PCA to reduce the number of column dimensions. I use the following codes examples and I see that only 23 are required features:</p>
  <pre><code>#first
  import numpy as np
  from sklearn.decomposition import PCA
  pca = PCA().fit(only_features)
  plt.figure(figsize=(15,8))
  plt.plot(np.cumsum(pca.explained_variance_ratio_))
  plt.xlabel('number of components')
  plt.ylabel('cumulative explained variance')
  
  #second
  df_pca = pca.fit_transform(X=only_features)
  df_pca = pd.DataFrame(df_pca)
  print(df_pca.shape)
  </code></pre>
  <p>However, I would want to know which are the features required. Like for example: If the original dataset had columns A-z and reduced by PCA, then I would want to know which are the features selected.</p>
  <p>How to do that?</p>
  <p>Thanks for help</p>