I am currently trying to read a specific column from my csv file but when running my script it errors out like this:
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()
I don't know why the script is running into this error so I would be very gald if someone could tell me how to fix this problem and explain what I've made wrong.
This is the content of my csv file:
column1,column2
john,john likes books
tom ,tom likes watching spiderman
This is my script:
col_list = ["column1", "column2"]
df = pd.read_csv("list.csv", usecols=col_list)
input_u = input('gimme a input')
if input_u == df["column1"]:#I think this is the line where the error is caused
print(df["column2"])
Thank's for every help and suggestion in advance:)