Project

General

Profile

Feature #3809

Update given Google sheet with the list of questions that have thumbs down greater than X

Added by Ram Kordale 21 days ago. Updated 14 days ago.

Status:
New
Priority:
High
Assignee:
Start date:
03/10/2025
Due date:
% Done:

0%

Estimated time:
0.40 h

Description

Google sheet to be used: https://docs.google.com/spreadsheets/d/1F5aDBK0GlwCZjxbegE0909rr3sgbsHD_LepQlgRCzEA/edit?gid=0#gid=0

Input would come from a file containing zero or more of:
server=dev|qa|prod
board=<board>
grade=<grade>
subject=<subject>
threshold=X

If the input file does not exist or is empty or does not have some key value pairs, assume all matching values. For example, if the input file does not exist, then the query would be all boards, grades and subjects. Also, if threshold is not available, assume X is 0.

Google sheet would contain zero or more entries with the following columns: board, grade, subject, style, chapter, exercise_number.

Sample code:

!pip install --upgrade gspread google-auth
import gspread
from google.colab import auth
from google.auth import default

  1. Authenticate and create the PyDrive client.
    auth.authenticate_user()
    creds, _ = default()
    gc = gspread.authorize(creds)
  1. Replace 'Your Spreadsheet Name' with the actual name of your Google Sheet
    spreadsheet = gc.open('Your Spreadsheet Name')
  1. Select the first sheet
    worksheet = spreadsheet.sheet1

rows = worksheet.get_all_values()

#do processing

  1. Example: Update a specific cell
    worksheet.update_acell('A1', 'Updated Value')
  1. Example: Append a new row
    new_row = ['Value1', 'Value2', 'Value3']
    worksheet.append_row(new_row)
#1

Updated by Ram Kordale 20 days ago

  • Assignee set to Dewakar Chaubey
  • Estimated time set to 0.35 h
#2

Updated by Ram Kordale 20 days ago

  • Assignee deleted (Dewakar Chaubey)
  • Estimated time deleted (0.35 h)
#3

Updated by Ram Kordale 20 days ago

  • Description updated (diff)
#4

Updated by Ram Kordale 20 days ago

  • Description updated (diff)
#5

Updated by Ram Kordale 20 days ago

  • Description updated (diff)
#6

Updated by Ram Kordale 20 days ago

  • Subject changed from Update given Google sheet with the list of questions that have thumbs down greater than X to Update given Google sheet with the list of questions that have thumbs down greater than 0
#7

Updated by Ram Kordale 17 days ago

  • Assignee set to Parag Patil
  • Estimated time set to 0.40 h
#8

Updated by Ram Kordale 17 days ago

  • Description updated (diff)
#9

Updated by Ram Kordale 14 days ago

  • Subject changed from Update given Google sheet with the list of questions that have thumbs down greater than 0 to Update given Google sheet with the list of questions that have thumbs down greater than X
  • Description updated (diff)

Also available in: Atom PDF