On the Principal Component Analysis in Python page, the example using the Iris Dataset had code using .ix , which is deprecated.
split data table into data X and class labels y
X = df.ix[:,0:4].values
y = df.ix[:,4].values
How would you rewrite that code using .loc or .iloc?