Это видео недоступно.
Сожалеем об этом.

How to Use Google Sheets With Python (2023)

Поделиться
HTML-код
  • Опубликовано: 13 окт 2021
  • In this video I go over how to use the gspread library to connect to your Google Sheets worksheets.
    Need one-on-one help with your project? I can help through my coaching program. Learn more here: prettyprinted.com/coaching
    If you're using Windows, you can use these commands in the command prompt to copy the credentials file:
    mkdir %APPDATA%\gspread
    move credentialsfile.json %APPDATA%\gspread\service_account.json
    Get the code here: prettyprinted.com/l/W9Y
    Twitter: / pretty_printed
    Github: github.com/prettyprinted

Комментарии • 124

  • @arseniimustafin3525
    @arseniimustafin3525 2 года назад

    Thank you! This is so handy! I tried to understand their tutorial and it left me confused, and then I watched this video and everything became crystal clear!

  • @horsdvours6953
    @horsdvours6953 9 месяцев назад +1

    Dug through several methods that didn't work - this one worked perfectly. Thank you very much!

  • @roka98
    @roka98 2 года назад +8

    Very simple and useful. Thank you for great lesson!

  • @MH-oc4de
    @MH-oc4de Год назад +2

    Dude, that was awesome! Thanks for clearly explaining this through a working example.

  • @isaacnaughton5206
    @isaacnaughton5206 2 года назад +10

    If I could upvote this more, I would. After spending a number of hours looking at outdated methods of connecting to GSheets via Python, I came across this video and managed it within 5 minutes. Thanks very much.

    • @urbaneplanner
      @urbaneplanner 2 года назад +3

      same here - I was missing a couple steps after reviewing the official materials, which this video laid out nicely

  • @paulofagandini8877
    @paulofagandini8877 Год назад +1

    Very good video, super clear and straight to the point, thanks!

  • @_Software_developer_
    @_Software_developer_ 8 месяцев назад +2

    After 200 tries finally got your video and successfully done 👍

  • @gavinjohn9998
    @gavinjohn9998 2 года назад +1

    Simple to follow, worked perfectly, thank you!

  • @urbaneplanner
    @urbaneplanner 2 года назад

    great overview - everything worked well for me after I installed based on the requirements file

  • @Alexa89715
    @Alexa89715 Год назад

    Oh my God, man, thank you so much!!!!!! I'm stuck at the API tracking stage and thank you that Google's algorithms gave me you, my God, thank you for existing! Good luck and all the best to you!

  • @mohabkhaled1391
    @mohabkhaled1391 2 года назад +8

    Super! as usual pretty printed, wondering about two things, can the graphics of GCP workplace products (docs, sheets, slides.. etc.) be integrated with my front end (I'm using React, and the libs I could find for word docs and sheets aren't all that), the second can this be a kick start for a GCP series?
    Thanks for the consistent awesome work during the years man.

  • @jacobzak7494
    @jacobzak7494 6 месяцев назад

    Thank you so much! That's actually works! The video is clear, short and helpful!

  • @tobiaszwojnar1465
    @tobiaszwojnar1465 Год назад

    I could not figure out how setting up cloud console works, but now I do. Thanks soo much

  • @brentsimpson3791
    @brentsimpson3791 Год назад +1

    Thank you! Very clear and concise.

  • @rrealityy
    @rrealityy 2 года назад +1

    This helped me out a ton - great video!

  • @synkronyze93
    @synkronyze93 2 года назад +4

    Very Helpful! Can you do a list of the formulas that can be use to update cells?

  • @blackchristiangeek
    @blackchristiangeek 2 года назад

    Awesome, awesome, awesome, and just what I was looking for. You, my friend, have a new subscriber. Thanks, and God bless

  • @ceo-s
    @ceo-s Год назад

    I had so many unexpected errors while trying authorize with another methods... Thank you so much! Helped alot!

  • @Fanta666
    @Fanta666 Год назад

    thank you so much! I was getting so lost in the weeds of the google API docs, this was a godsend

  • @blackchristiangeek
    @blackchristiangeek 2 года назад

    Update: Since my original post, I have gotten the code to work and started exploring the infinite possibilities and wanted to say again, thank you. I am working through my rust as I have note written much code for a while now and this give me a leg up since I'm a Google Apps customer. I'm ready to help others now 😅

  • @juanbaruque2246
    @juanbaruque2246 2 года назад

    Just what I needed. Thanks!

  • @DanteDerette
    @DanteDerette 2 года назад +1

    Nice Video Antonhy, Thank yooou!

  • @europeanunion5765
    @europeanunion5765 2 года назад +1

    Thx for the 101, I really wished that you showed us how to append at the end / first empty row though. I think this is more important than "modify" and "remove".

  • @FRIKIdelTO
    @FRIKIdelTO 6 месяцев назад

    Great tutorial. Thank you so much. Very helpful to me!!!!

  • @kuaranir2440
    @kuaranir2440 Год назад

    Thanks! So useful and understandable

  • @justinbirchard1298
    @justinbirchard1298 Год назад

    Excellent video, thank you very much!

  • @redasaidi999
    @redasaidi999 2 года назад

    very nice and simple, thanks

  • @krishnagarg6870
    @krishnagarg6870 2 года назад

    Concise and clear!

  • @hungphan
    @hungphan Год назад

    Best explaination. Cant expect more

  • @jag353
    @jag353 Год назад

    Very elegant, appreciate it!

  • @alan-j
    @alan-j 2 года назад +1

    @prettyprinted can you also show a list of methods that are avaiable under the worksheet module?

  • @laherikeval2524
    @laherikeval2524 10 месяцев назад +1

    Great video thank you for such a great content.

  • @alexandruion4686
    @alexandruion4686 9 месяцев назад

    Good video! It helped!

  • @yiannishadjiyianni7737
    @yiannishadjiyianni7737 2 года назад

    Thank you! Great tutorial

  • @sicco9326
    @sicco9326 Год назад

    Very nice tutorial ! Keep it up!

  • @slippertopia
    @slippertopia 2 года назад

    Very detailed. I like it.

  • @poloi3440
    @poloi3440 Год назад

    Thank you very much, I spent 1h trying to understand that and with your vid it took me like 15min lmao

  • @alirahmani7815
    @alirahmani7815 10 месяцев назад

    Thank you. It is very useful

  • @bulik1384
    @bulik1384 5 месяцев назад

    thanks you so much bro!

  • @stevenlomon
    @stevenlomon Год назад

    Thank you for this tutorial!!

  • @sprokgnv9436
    @sprokgnv9436 2 года назад

    Amazing! Thanks a lot!

  • @bassamry
    @bassamry 2 года назад

    Thanks for the clear tutorial!
    is it possible to send events from the gsheet to the python script? i.e. is there and api for the puthon to listen to changes in the shett?
    my usecase is that i have a large sheet that i need to capture the changed cells only rather than reading the whole thing.

  • @sewasup9816
    @sewasup9816 2 года назад

    Thank you very very veryyyyyyyyyy much for this tutorial !!!

  • @AnotherOneTF
    @AnotherOneTF 2 года назад

    thank you! i love your video

  • @ulka7777
    @ulka7777 Год назад

    Great, thanks for sharing.

  • @keshavsharma9380
    @keshavsharma9380 2 года назад +8

    First! Btw you helped me a lot in early days of my Python programming. Thanks!

  • @RatnakarDutt
    @RatnakarDutt 2 года назад

    It helped me. thanks a lot.

  • @_eevee396
    @_eevee396 2 года назад

    Thank you so much!!!

  • @erectlocution
    @erectlocution 2 года назад

    Curious--and I'll give it a try to find out--but does this hook into the Google Sheets versioning functionality, such that the changes are undoable? If it does it's not in the documentation, but maybe that's just a Google Sheets domain thing and not something they leave up to clients.

  • @anjanikumar3042
    @anjanikumar3042 2 года назад

    very helpful !!

  • @zahoorahmadkareemi6267
    @zahoorahmadkareemi6267 2 года назад

    Very helpful, please make a video on "How to get daily employees activities updates from google sheet using python

  • @botelhorui
    @botelhorui 2 года назад +6

    Very good, simple, clear, effective. Recommendations for next time, you can try: 1) Start with short pseudocode (as documentation) to enable higher thinking and reduce programming details noise. 2) Split browser and IDE vertically to reduce feedback time. Good luck!😀

  • @devpolybytes
    @devpolybytes 10 месяцев назад

    Thank you so much for the tutorial, it was a huge help and very straight to the point! One thing I would like to say though is that I don't think your variable names are very descriptive and this video being found by someone who is relatively new to programming may see this and subconsciously form a bad variable naming habit.

  • @user-jd8ut8ow1b
    @user-jd8ut8ow1b 2 года назад

    easy and clear :)

  • @ofernandez22
    @ofernandez22 Год назад

    great tutorial, i have a quetion this google apis , have any cost?

  • @Apopjak
    @Apopjak Год назад

    u re amazing!

  • @Kennethlumor
    @Kennethlumor 2 года назад

    Sir please please and please I beg you help me do a video on how to add a search 🔎 systems to the flask app.

  • @PeterSodhi
    @PeterSodhi Год назад

    Good job

  • @Gioseeeppe
    @Gioseeeppe 10 месяцев назад

    nice video, one question, the results from the google spredsheet is in clear and if it is how can I encrypt it?

  • @lloydino
    @lloydino Год назад

    honestly, so helpful. Every comment's saying the same thing so we know it's true

  • @Kennethlumor
    @Kennethlumor 2 года назад

    I watch ur earlier video on on how to add using whoosh but I'm just getting (no module found flaskext) sir please help me

  • @timo_b3
    @timo_b3 2 года назад

    awesome!

  • @shashiranjan7451
    @shashiranjan7451 2 года назад

    awesome awesome!!

  • @firealarmapprentice4517
    @firealarmapprentice4517 Год назад

    Great video, I want to populate a google sheet with data coming from my serial port.

  • @vincesnetterton2515
    @vincesnetterton2515 Год назад

    Question, actually multiple questions. I am using Python 3.7 on Windows. Can I use this to access my own personal Googlesheets with Google Developer?

  • @4brothers943
    @4brothers943 2 года назад

    Don't know what to say, it's a Awesome !!

  • @TheArtofCodeIsCool
    @TheArtofCodeIsCool 2 года назад

    (New Things Learned) / Time > Most Videos => Thanks!!!

  • @Ultrajamz
    @Ultrajamz 2 года назад +1

    I have been given a json file key at work, but I do not have access to the service account itself to do this.. whats the best way to proceed? I’d like to be able to use python as a backend for updating a sheet others can see.. I guess I have to not use the service account and use my google user account?

  • @aleksey3231
    @aleksey3231 Год назад

    What about insert matplotlib graph to spreadsheet?

  • @acezflo641
    @acezflo641 2 года назад

    i dont get making the file in the appdata folder. how would i be able to make a folder on my drive containing both my main.py and my json?

  • @paulapoblete1090
    @paulapoblete1090 Год назад

    This is so cool, how can I learn as a total beginner?

  • @theusurper
    @theusurper 2 года назад

    Just pretty printed dropping gold content

  • @Anonymous-co3jv
    @Anonymous-co3jv 2 года назад +3

    Amazing!
    One thing I feel missing though. How do you add/update to the end of the worksheet.

    • @Anonymous-co3jv
      @Anonymous-co3jv 2 года назад +2

      The code to update new row at the end
      ```
      last_row = (len(sh.get_all_values()))
      i = str(last_row+1)
      sh.update('A'+i+':C'+i, [['Cell Value' , 'Cell Value' , 'Cell Value']])
      ```

    • @EpicCouchPotatoes
      @EpicCouchPotatoes 2 года назад +1

      @@Anonymous-co3jv Error for this code: "AttributeError: 'Spreadsheet' object has no attribute 'get_all_values'"

  • @sketchwaretagalogtutorials
    @sketchwaretagalogtutorials Год назад

    🎉🎉🎉 it worked

  • @user-hp2jn3uq3f
    @user-hp2jn3uq3f 9 месяцев назад

    Hello, I didnt really get it how we have to use the code in the description for window's users : "mkdir %APPDATA%\gspread
    move credentialsfile.json %APPDATA%\gspread\service_account.json"
    Where I have to replace the link of my json file ?

  • @tabraizcreation7689
    @tabraizcreation7689 2 года назад

    Watched for 3 mints as it was required to setup GCP and key correctly then moved to github and gspread docs :-D

  • @butchdavis2062
    @butchdavis2062 2 года назад +4

    Absolutely brilliant. I'm currently a temp at Google and this is going to help me land a permanent role with them by the end of the month
    Bravo

    • @paulus4443
      @paulus4443 2 года назад

      Did you get the job?

    • @butchdavis2062
      @butchdavis2062 2 года назад +2

      @@paulus4443 No but I'm making even more $ working at my new company!!!

    • @praveen16007
      @praveen16007 Год назад

      @@butchdavis2062 Would love to get an interview there xD

  • @syed2396
    @syed2396 8 месяцев назад

    nice

  • @dmbrv
    @dmbrv 2 года назад

    nice video

  • @simonbook1587
    @simonbook1587 Год назад

    what is the program at 2:46

  • @ivanovchin
    @ivanovchin Год назад

    Thanks, I from Russia and this video help me

  •  Год назад

    no ver xq solo es como imrpimir data y borrar filas en sheets , no hay dashboard

  • @princecharmie1376
    @princecharmie1376 2 года назад

    Is there any money require to create Google developer account

  • @I_O_O_I
    @I_O_O_I 2 года назад

    What are the commands if using Mac, not Linux or Windows?

    • @AhmadFIksan
      @AhmadFIksan 2 года назад

      Mac is Unix based system, so it should have similar commands with Linux

  • @user-gl1jt9ou1u
    @user-gl1jt9ou1u Год назад

    Hi , what app do you use editing python script? And what OS ?

  • @lucca6094
    @lucca6094 Год назад

    how can i make an .exe file without loosing my token.json?

  • @michaelkeith5398
    @michaelkeith5398 Год назад

    I was able to use this video to get a Bokeh dashboard hosted on AWS that uses data from Google Sheets, but it only works if you are signed into the account with the API enabled. Any way to make it so anyone can view the dashboard?

    • @michaelkeith5398
      @michaelkeith5398 Год назад

      Nvm it was user error. And just so everyone knows, I’m smart enough to get a bokeh app hosted on aws. Too dumb to realize that accessing the url with or without / character at the end can make the difference between whether it’s viewable or not 😂

    • @prettyprinted
      @prettyprinted  Год назад

      @@michaelkeith5398 haha glad you figured it out.

  • @armaankhaitan6741
    @armaankhaitan6741 Год назад

    UserWarning: [Deprecated][in version 6.0.0]: method signature will change to: 'Worksheet.update(value = [[]], range_name=)' arguments 'range_name' and 'values' will swap, values will be mandatory of type: 'list(list(...))' How do I get rid of this messsage?

    • @prettyprinted
      @prettyprinted  Год назад

      You'll have to use the new style of code they want. I'll probably make an updated version of this video using the new style.

  • @user-ht3yo3do5f
    @user-ht3yo3do5f Год назад

    you are a fucking king excellent tutorial

  • @BadMeditator
    @BadMeditator Год назад

    Hello. It takes forever to run the command, 'python script.py'. What can I fo?

    • @prettyprinted
      @prettyprinted  Год назад

      Most of the slowness will be because of the API call to Google's servers. The library is just a wrapper around the API.

  • @francescovadala4731
    @francescovadala4731 9 месяцев назад

    I cannot wrap my head around why executing the python script would take this long. I ran the same script with a very small sheet 9x4 (RxC), no formulas, no conditional formatting, and still the script takes 10 to 15 min to run. Does anyone have an idea what may make it so slow?

  • @alexanderkorniychuk9410
    @alexanderkorniychuk9410 2 года назад +1

    what text editor are you using?

  • @fishmasterkg2062
    @fishmasterkg2062 2 года назад

    B-R-I-L-L-I-A-N-T-!!!

  • @abhijeetchoudhary1765
    @abhijeetchoudhary1765 2 года назад

    how to add this data in a dataframe?

  • @alexdarlington4072
    @alexdarlington4072 2 года назад +1

    I get SpreadsheetNotFound.

  • @mohammadabdullah9777
    @mohammadabdullah9777 2 года назад

    You just missed how to Read the data from Google sheets as a Dataframe.
    For that just use the following code snippet:
    # get_all_values gives a list of rows.
    rows = wks.get_all_values()
    print(rows)
    # Convert to a DataFrame and render.
    import pandas as pd
    testf = pd.DataFrame.from_records(rows)
    testf

  • @jamesacosta6090
    @jamesacosta6090 9 месяцев назад

    did not work for windows

  • @aneetakhoso384
    @aneetakhoso384 2 года назад +1

    so i need to pay $300 ?

    • @aneetakhoso384
      @aneetakhoso384 2 года назад +1

      hmm, well, i was so new to google developer, took a while to figure out that you dont have to go through the setup that displays upon landing the page. can just create project for free, without going through the $300 setup. keep comment here instead of deleting incase it helps another noob out.

    • @sicco9326
      @sicco9326 Год назад

      @@aneetakhoso384 im a noob, how did you do it? I still have to create the google cloud account I guess?

  • @mrm8818
    @mrm8818 2 года назад

    this is already out of date

  • @susanca8443
    @susanca8443 8 месяцев назад

    Thank you for sharing. I followed and authorised everything, but still getting an error create_connectionsock.connetction(sa) error