I am trying to select all columns in a pandas dataframe in python except the first column using iloc.
I am able to select all column except the last one using the code
Pre_Processed.iloc[:,0:-1]
Could anyone please help me with this?
I am trying to select all columns in a pandas dataframe in python except the first column using iloc.
I am able to select all column except the last one using the code
Pre_Processed.iloc[:,0:-1]
Could anyone please help me with this?
try this
Pre_Processed.iloc[:,1:]
index with iterable works like--iterable[start:end:stride]
know more about stride-https://www.digitalocean.com/community/tutorials/how-to-index-and-slice-strings-in-python-3#:~:text=The%20third%20parameter%20specifies%20the,two%20index%20numbers%20is%20retrieved.