networkcommons.visual.plot_pca
- networkcommons.visual.plot_pca(dataframe, metadata, feature_col='idx', **kwargs)
Plots the PCA (Principal Component Analysis) of a dataframe.
- Parameters:
dataframe (pd.DataFrame) – The input dataframe containing numeric columns.
metadata (pd.DataFrame or array-like) – The metadata associated with the dataframe or an array-like object representing the groups.
- Returns:
The dataframe with PCA results.
- Return type:
pd.DataFrame
- Raises:
ValueError – If the dataframe contains no numeric columns suitable for PCA.