indexing python dataframe iloc 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: loc and iloc in pandas
iloc - default indexes (system generated)
loc - table indexes or we manually given indexes