My one hot encoder function works well, however, when I want to pass the argument (feature, label) using map -as explained in the instructions- I cant separate the dataset in feature and label so it looks like the test in the notebook :
TESTING THE FUNCTION
_,one_hot = my_one_hot([“a”,“b”,“c”,“a”],[1,2,3,1])
print(one_hot)
the dataset has no index, how can I send the elements as two arguments. I would greatly appreciate some tips.