I am having a problem to put an entire row from data in a list import pandas as pd import numpy as np import csv df= pd.read_csv ("data.csv") my_list = [] # list for n in range(1, len(df)): #entire data if df.loc[n].isin([1]).any() : # if a value 1 is found in any row my_list.append(df.loc[n:n]) # add the row in my_list I am trying to find a row where any value of that row has 1 ,then put the entire row in my_list . How can i add all the data from that row in a list and continue ? But its showing "unhashable type: 'Series'" Continue reading...