I wonder why this line returns "invalid syntax", and what's the correct syntax to use for selecting both isolated columns and ranges in one go:
X = f1.iloc[:, [2,5,[10:19]]].values
Btw the same happens with:
X = f1.iloc[:, [2,5,10:19]].values
Thanks.
Second is correct syntax, only need
numpy.r_
for concanecate indices:Also is possible first convert values to numpy array, then
iloc
is not necessary: