looks like he is getting PCA of the returns themselves instead of the returns correlation which is what I have always done.
from sklearn.decomposition import PCA
import pandas as pd
returns=pd.DataFrame([
[ 0.0143 , 0.0910 , 0.1451 ]
,[ 0.1791 , 0.3505 , 0.4588 ]
,[ 0.0572 , 0.1358 ...