mercredi 2 octobre 2019

Argument of type 'numpy.int64' is not iterable. For with if x not in list

categories = list()

for i in range (len(purchases_reader)): purchase_type = purchases_reader.iloc[i, 3] if purchase_type not in categories: categories = purchase_type print (categories)

I want to check if the value purchase_type exists in the list categories before the value is inserted to the list

Aucun commentaire:

Enregistrer un commentaire