how to iloc pandas code example
Example 1: iloc in dataframe
df=pd.read_csv('yourcsv.csv')
X=df.iloc[:,:-1].values
y=df.iloc[:,1].values
Example 2: X = df.iloc[:, 1:]
X = df.iloc[:, 1:]
df=pd.read_csv('yourcsv.csv')
X=df.iloc[:,:-1].values
y=df.iloc[:,1].values
X = df.iloc[:, 1:]