I have the following dataframe df:
print(df) Food Taste 0 Apple NaN 1 Banana NaN 2 Candy NaN 3 Milk NaN 4
Purely integer-location based indexing for selection by position.. eg :-
lang_sets = {} lang_sets['en'] = train[train.lang == 'en'].iloc[:,:-1] lang_sets['ja'] = train[train.lang == 'ja'].iloc[:,:-1] lang_sets['de'] = train[train.lang == 'de'].iloc[:,:-1]