pandas iloc with index lsit code example
Example 1: filter dataframe with a list of index
df[df.index.isin([1,3])]
Example 2: iloc in dataframe
df=pd.read_csv('yourcsv.csv')
X=df.iloc[:,:-1].values
y=df.iloc[:,1].values
df[df.index.isin([1,3])]
df=pd.read_csv('yourcsv.csv')
X=df.iloc[:,:-1].values
y=df.iloc[:,1].values