How to update Row based on ID value - Sheets API py

Viewed 57

Right now I'm creating a leaderboard for a game that my Discord Bot runs. The data for this leaderboard I'm uploading to Google Sheets through their API.

My goals are:

  1. Identify the player by it's unique discord number, and append it to the first column (Done!)
  2. Update their wins and loses, to calculate the points (Only succeeded if it's a player playing for the first time)
  3. Print a table with the highest scoring points to the lowest (Not done)

Here is a print of how the Spreadsheet looks like

Now my main problem is when the player is already in the database and I must edit the columns 2 and 3 with wins or loses. That is because I'm trying to use the following code to fetch the coordinates of the ID in the first column, but this object is not subscriptable:

player = sheet1.find('9282', in_column=1)

When I try to isolate the Row number with a str(player[7:9]) for example, the not subscriptable error appears.

Any suggestions?

0 Answers
Related