I'm trying to write a function that will enable a user to easily select a specific cell in a pandas dataframe and change its value. For instance, in the dataframe below, I would like to have a user be able to select a cell by date and action, say "2018-03-02" and "Manure", and change the value to "1".
I have done this already at 2018-03-02 and "Cutting" by using this code (the dataframe is named q):
q.iat[1,1]=1
However, I would like to be able to change the cell using something like q.iat["2018-03-02", "Cutting"]=1, but am not sure how to do this, as it says .iat only recognizes integer postions. Is there something besides .iat I could use, or would I need to set a dictionary for every date and every column?