📅  最后修改于: 2022-03-11 14:44:57.698000             🧑  作者: Mango
import pandas as pd
import numpy as np
from sklearn.decomposition import PCA
df = pd.DataFrame(data=np.random.normal(0, 1, (20, 10)))
pca = PCA(n_components=5)
pca.fit(df)