This is probably simple but I cant find the explanation and it happens to me all the time.
I am trying to selected values from column Rate1E that are over 3.5 and view the rest of the rows in pandas DataFrame energy for selected rows meeting criteria as stated above. I had someone give me an answer before and have simply changed to text as follows:
energy = energy.loc[energy[:, 'Rate1E'] >= 3.5]
print(energy.loc[:, 'Rate1E'])
However once again I have found myself with the error:
TypeError: unhashable type: 'slice'
Online solutions suggest .loc is the answer. Would someone know how to fix the code or better yet explain to me why I always seem to get that error.
Thanks.