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