I have PC1 and PC2, but I need to explain to my team what they mean in terms of the original columns.
How it works
Each principal component is a weighted combination of the original features. The weights are stored in components_, which has one row per component and one column per original feature. A large weight (positive or negative) means that feature has a strong influence on the component.
Answer 1: Put components_ into a DataFrame
import pandas as pd
pca = PCA(n_components=3).fit(X_scaled)
weights = pd.DataFrame(
pca.components_.T,
index=X.columns,
columns=[f"PC{i+1}" for i in range(pca.n_components_)],
)
print(weights["PC1"].abs().sort_values(ascending=False).head(10))
Look at both the size and the sign of each weight. For example, if income and spending both have large positive weights on PC1, then PC1 roughly measures "overall wealth". Features with opposite signs pull the component in opposite directions.
