This is how you update a value at a specific cell:

  • Suppose the row index of the cell is row_idx, and the column label is ‘colname’, then you can update the cell value this way: df.at[row_idx, ‘colname’] = new_value.

Or:

  • Suppose the row index of the cell is row_idx, and the column index is col_idx, then you can update the cell value this way: df.iat[row_idx, col_idx] = new_value.

I got this idea from <a href=“https://re-thought.com/how-to-change-or-update-a-cell-value