Using Google Sheets in Python: Finding and Updating Cells

Пікірлер: 68

  • @jappagtakhan
    @jappagtakhan2 жыл бұрын

    when stackoverflow, reddit, google fails here you are a video from 2018 that is very helpful. great work! i have subscribe to your channel. thanks a lot

  • @sohntv8105
    @sohntv81054 жыл бұрын

    Lol this channel is seriously underrated. Every software engineering job ive had so far (2 lol) I have used this channel to get my tickets done at work. From making rest api's in flask to doing google spreadsheets in python in tandem with sqlalchemy. Thank you good sir.

  • @vinayaksudalai9114
    @vinayaksudalai91144 жыл бұрын

    Loads Of Love Man ! You're a Life Saver ! I can't thank you enough ! I really owe you one !

  • @mr_jacklu8014
    @mr_jacklu80144 жыл бұрын

    Yes, this video definitely helped! Thanks Anthony.

  • @yuvigerstein
    @yuvigerstein5 жыл бұрын

    Great stuff, so happy to learn from you :)

  • @prettyprinted

    @prettyprinted

    5 жыл бұрын

    Glad you like my videos. Thanks for watching.

  • @SilvianDragan
    @SilvianDragan4 жыл бұрын

    Excellent video dude. Keep this stuff up!

  • @iandthopper
    @iandthopper5 жыл бұрын

    Thank you. Excellent video.

  • @prettyprinted

    @prettyprinted

    5 жыл бұрын

    You're welcome! Thanks for watching.

  • @biurai.com-biuruofisuadmin2799
    @biurai.com-biuruofisuadmin27994 жыл бұрын

    Just found video and subscribed !:)) Amazing

  • @normprokup9313
    @normprokup93136 жыл бұрын

    I'm glad I discovered your channel. You have covered several topics that I'm really interested in learning about, and your explanations are very clear. Have you (or have you considered) doing a video introduction to the Google Drive API?

  • @prettyprinted

    @prettyprinted

    6 жыл бұрын

    I'll definitely consider that one. There are a ton of useful Google APIs.

  • @fatmaabdelraouf1134
    @fatmaabdelraouf11346 жыл бұрын

    Thank you for the great videos.

  • @prettyprinted

    @prettyprinted

    6 жыл бұрын

    You're welcome! Thanks for watching.

  • @liam898
    @liam8986 жыл бұрын

    So helpful. thank you!

  • @prettyprinted

    @prettyprinted

    6 жыл бұрын

    Thanks for watching!

  • @ChanchalChhabra1
    @ChanchalChhabra13 жыл бұрын

    explained everything very nicely. Could you please also share info on how to add/append new rows and delete rows in google sheet? If you already have video on it, please share. Thanks!

  • @phil9947
    @phil99473 жыл бұрын

    You rock. Thank you so much.

  • @shinkevin3379
    @shinkevin33794 жыл бұрын

    Thanks for your tutorial! How do we update the color of a cell or the color of row(column) through Python? Could you make a video for this? I am using Python Colab. Thanks!

  • @MobiadsSolution
    @MobiadsSolution3 жыл бұрын

    Hey dude, nice tips. I needed to update the record in the cell after found record in same row and fix the error if not found. Thanks

  • @s_p_a_c_e_m_a_n
    @s_p_a_c_e_m_a_n5 жыл бұрын

    Awesome Video!

  • @prettyprinted

    @prettyprinted

    5 жыл бұрын

    I'm glad you like it. Thanks for watching!

  • @stillinmusic
    @stillinmusic6 жыл бұрын

    Thank you!

  • @prettyprinted

    @prettyprinted

    6 жыл бұрын

    You're welcome! Thanks for watching.

  • @vaibhavrothe873
    @vaibhavrothe8736 жыл бұрын

    Thanks a lot!

  • @prettyprinted

    @prettyprinted

    6 жыл бұрын

    You're welcome! Thanks for watching.

  • @darrenc2370
    @darrenc23704 жыл бұрын

    Hi! this 'find' function is really useful! but how can i call it without python but using the REST api with http request? i am creating an app using cocos creator targeting on web, and i do not know of any client library that i can use for my target platform and engine combination.

  • @Tenly2009
    @Tenly20092 жыл бұрын

    2 questions: How would you find the last cell containing text in a specific column ? (Or the first empty cell - for if I wanted to appended to an existing list…) How would you restrict your find command to a single column instead of the entire worksheet ?

  • @SqrAwySailor
    @SqrAwySailor6 жыл бұрын

    How do I update a Data Frame to a Google Sheet? I tried using .update_cell() but, of course, that puts the entire Data Frame inside a single cell. How do I spread out the data amongst several rows and columns?

  • @bernnardofranciscorodrigue6338
    @bernnardofranciscorodrigue63385 жыл бұрын

    Excellent video! Helped me a lot! Is there any way that I could "jump" a column using append_row? For example: append_row(1,2,3,4, ,6) and write nothing in the fifth column?

  • @prettyprinted

    @prettyprinted

    5 жыл бұрын

    You should be able to do that. Just pass an empty for the column you want to skip over.

  • @prajitkumar6027
    @prajitkumar60272 жыл бұрын

    hello , as i have created dataframe with pandas and getting print output. Now i have established api connection with google sheet and able to manipulate rows and columns ie adding rows and columns etc but not getting the data filled in the sheet. can you help me for any leads?

  • @VivekKBangaru
    @VivekKBangaru6 жыл бұрын

    Thanks.

  • @prettyprinted

    @prettyprinted

    6 жыл бұрын

    You're welcome!

  • @kishorep3668
    @kishorep36684 жыл бұрын

    Could you make another video which write list of data into columns based on dates as column name? Thanks

  • @DLVSolutions
    @DLVSolutions5 жыл бұрын

    Thanks so much for this. Could you give us an idea on how to write a script that enables Python to find the first row available and write there? Im having a bit of a challenge in getting this to work. :) Thanks so much!

  • @prettyprinted

    @prettyprinted

    5 жыл бұрын

    I'm going to remake this video soon, so I can cover what you mentioned.

  • @xbossxyt5630
    @xbossxyt56306 жыл бұрын

    Thank you for the great videos. I got a question, how can access sheet 2 and 3 4 5 etc.. I've created a different var for it ending with .sheet2 but gave me an error (AttributeError: 'Spreadsheet' object has no attribute 'sheet2')

  • @prettyprinted

    @prettyprinted

    6 жыл бұрын

    This may help you: stackoverflow.com/questions/33570749/python-gspread-library-only-writes-to-worksheet-labeled-sheet1

  • @xbossxyt5630

    @xbossxyt5630

    6 жыл бұрын

    Thank you very much.

  • @mreavey2000
    @mreavey20005 жыл бұрын

    Thanks for this. I'm just starting with gspread -- can't find an example of this: how would I insert values into a new column on a given worksheet? Would I need to loop and insert cell by cell? The challenge I have is I don't know how long the list of values will be. I will be getting it from a JSON response and formatting into a list. Thanks!

  • @prettyprinted

    @prettyprinted

    5 жыл бұрын

    You would get all the cells you want update, and then you would loop to update each cell. github.com/burnash/gspread#updating-cells

  • @user-ft5uy1et2f
    @user-ft5uy1et2f5 жыл бұрын

    Great tutorial, how to append a list into column a googlespread?

  • @prettyprinted

    @prettyprinted

    5 жыл бұрын

    I'm not sure what you mean. A Python list into a spread sheet? What do you want the result to look like in the spread sheet?

  • @paulgerhard5170
    @paulgerhard51702 жыл бұрын

    when the content of the cell is a hyperlink, print acell does not return any value. Can you help?

  • @cristianalexismejia
    @cristianalexismejia5 жыл бұрын

    Hello my brother, thank's for the video I don't find the data that I'm seek then I get an error how can I fix it

  • @eugenepilat8685

    @eugenepilat8685

    5 жыл бұрын

    Use try except construction

  • @gtasanandreas684
    @gtasanandreas68411 ай бұрын

    Can i update an empty cell? let's say that it was the same row but i need to check whether i.e column H or J is empty or not, it it is empty then you can append the data, if it's not then skip row, is there a function to do that kind of thing?

  • @prettyprinted

    @prettyprinted

    11 ай бұрын

    I'm not sure if there's a function, but you could just read the cell first and then use an if statement to determine what you do after that point.

  • @naveenlocks2974
    @naveenlocks29746 жыл бұрын

    Hello sir, can u make a video on styling wtforms in flask.... Such that the form looks too pretty.. I mean.. like transparent forms and something else like that... But show how to style wtforms in flask....

  • @prettyprinted

    @prettyprinted

    6 жыл бұрын

    Yeah, I'll cover that in the future.

  • @naveenlocks2974

    @naveenlocks2974

    6 жыл бұрын

    I just got a problem in django... I have created my own user model for usernames and other things.....i cannot use authenticate function since it is not inbuilt user model... So i did some authentication on my own with some logics... But now i want to use loginrequired decorator... How to use it for my custom model... Or how can i make a login required decorator ...i just have a project to do... Please help me with it... If u can't make a video on that ..plzz send some example codes to my email : naveenprolific123@gmail.com..... Thanks in advance

  • @biaotang5011
    @biaotang50116 жыл бұрын

    hi Bro ,when I update_to_cells() ,I got a error like this below: gspread.v4.exceptions.APIError: { "error": { "code": 400, "message": "Requested writing within range ['sheet1'!A5:A6], but tried writing to column [B]", "status": "INVALID_ARGUMENT" } } I have no idea to solve it ,can you kindly show me some advises.

  • @liam898

    @liam898

    6 жыл бұрын

    wks.update_acell('B2','newvalue')

  • @dannyl4050
    @dannyl40505 жыл бұрын

    For some reason im getting a MODULENotFoundError: No module named 'oauth2client". I know the client is installed. Any idea why that is? Im using pycharm

  • @prettyprinted

    @prettyprinted

    5 жыл бұрын

    Is that the only package it fails for in Pycharm? Because it's a pretty straightforward package to install.

  • @obsidiansiriusblackheart
    @obsidiansiriusblackheart5 жыл бұрын

    please make one where you get the top row of every sheet in the spreadsheet (eg if you had sheet1-4 and wanted all rows where the top row had a value in it)

  • @prettyprinted

    @prettyprinted

    5 жыл бұрын

    I'll see what I can do.

  • @vinsmokearifka
    @vinsmokearifka5 жыл бұрын

    how to appending row down

  • @whatwasthat821
    @whatwasthat8214 жыл бұрын

    Anybody knows how to filter by color with "get"? Maybe I blind or smth but didn't see that in the documentation. I basically need to filter my spreadsheet by 2 colors.

  • @ukaszkwiecinski1781
    @ukaszkwiecinski17814 жыл бұрын

    how can I update a whole row?

  • @dominicdill
    @dominicdill4 жыл бұрын

    Why don't you need to identify a spreadsheet ID in your script? developers.google.com/sheets/api/guides/concepts says to always include one Also, if your workbook has multiple sheets, how do you identify which one you are pulling from? Say I want cell A2 from sheet 2, not sheet 1. I tried changing the sheet1 in the open command to the name of my second sheet, but that didnt work.

  • @AndersonSouza-ux1hk
    @AndersonSouza-ux1hk5 жыл бұрын

    Hello Anthony. Is there anyway to export Google spreadsheet to XML with Python?

  • @prettyprinted

    @prettyprinted

    5 жыл бұрын

    Yes, it's not a direct conversion between the two, but because you can read your Google sheet in Python and because there are ways to create XML from Python, you can do this. I'd look for XML libraries (or just hand write the XML) to accomplish this.

  • @AndersonSouza-ux1hk

    @AndersonSouza-ux1hk

    5 жыл бұрын

    @@prettyprinted thanks. It's worked.

  • @buwwet515
    @buwwet5155 жыл бұрын

    I was wondering how to convert the output from a cell to a variable, I can't find a way to do it.

  • @mmustho7740

    @mmustho7740

    5 жыл бұрын

    some_variable = wks.acell('A2')

  • @liam898
    @liam8986 жыл бұрын

    dat burp tho 5:57