+ 1

Why am I getting error ?

I am having a dataset of 2 columns . I'm splitting the dataset into x and y X = dataset.iloc[:,1] # doesn't work X = dataset.iloc[:,1:-1] #works Even though it is meant the same it is showing error !

20th Nov 2020, 8:13 AM
Levi
Levi - avatar
1 Respuesta
+ 4
It's not the same [:,1:-1] means it's counting in reverse
22nd Nov 2020, 6:55 AM
Izaiah Kay
Izaiah Kay - avatar