Это видео недоступно.
Сожалеем об этом.
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
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!
Dug through several methods that didn't work - this one worked perfectly. Thank you very much!
Very simple and useful. Thank you for great lesson!
Dude, that was awesome! Thanks for clearly explaining this through a working example.
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.
same here - I was missing a couple steps after reviewing the official materials, which this video laid out nicely
Very good video, super clear and straight to the point, thanks!
After 200 tries finally got your video and successfully done 👍
Simple to follow, worked perfectly, thank you!
great overview - everything worked well for me after I installed based on the requirements file
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!
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.
Thank you so much! That's actually works! The video is clear, short and helpful!
I could not figure out how setting up cloud console works, but now I do. Thanks soo much
Thank you! Very clear and concise.
This helped me out a ton - great video!
Very Helpful! Can you do a list of the formulas that can be use to update cells?
Awesome, awesome, awesome, and just what I was looking for. You, my friend, have a new subscriber. Thanks, and God bless
I had so many unexpected errors while trying authorize with another methods... Thank you so much! Helped alot!
thank you so much! I was getting so lost in the weeds of the google API docs, this was a godsend
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 😅
Just what I needed. Thanks!
Nice Video Antonhy, Thank yooou!
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".
Great tutorial. Thank you so much. Very helpful to me!!!!
Thanks! So useful and understandable
Excellent video, thank you very much!
very nice and simple, thanks
Concise and clear!
Best explaination. Cant expect more
Very elegant, appreciate it!
@prettyprinted can you also show a list of methods that are avaiable under the worksheet module?
Great video thank you for such a great content.
Good video! It helped!
Thank you! Great tutorial
Very nice tutorial ! Keep it up!
Very detailed. I like it.
Thank you very much, I spent 1h trying to understand that and with your vid it took me like 15min lmao
Thank you. It is very useful
thanks you so much bro!
Thank you for this tutorial!!
Amazing! Thanks a lot!
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.
Thank you very very veryyyyyyyyyy much for this tutorial !!!
thank you! i love your video
Great, thanks for sharing.
First! Btw you helped me a lot in early days of my Python programming. Thanks!
Glad I could help!
It helped me. thanks a lot.
Thank you so much!!!
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.
very helpful !!
Very helpful, please make a video on "How to get daily employees activities updates from google sheet using python
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!😀
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.
easy and clear :)
great tutorial, i have a quetion this google apis , have any cost?
u re amazing!
Sir please please and please I beg you help me do a video on how to add a search 🔎 systems to the flask app.
Good job
nice video, one question, the results from the google spredsheet is in clear and if it is how can I encrypt it?
honestly, so helpful. Every comment's saying the same thing so we know it's true
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
awesome!
awesome awesome!!
Great video, I want to populate a google sheet with data coming from my serial port.
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?
Don't know what to say, it's a Awesome !!
(New Things Learned) / Time > Most Videos => Thanks!!!
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?
What about insert matplotlib graph to spreadsheet?
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?
This is so cool, how can I learn as a total beginner?
Just pretty printed dropping gold content
Thanks for watching!
Amazing!
One thing I feel missing though. How do you add/update to the end of the worksheet.
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']])
```
@@Anonymous-co3jv Error for this code: "AttributeError: 'Spreadsheet' object has no attribute 'get_all_values'"
🎉🎉🎉 it worked
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 ?
Watched for 3 mints as it was required to setup GCP and key correctly then moved to github and gspread docs :-D
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
Did you get the job?
@@paulus4443 No but I'm making even more $ working at my new company!!!
@@butchdavis2062 Would love to get an interview there xD
nice
nice video
Thanks
what is the program at 2:46
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
Is there any money require to create Google developer account
What are the commands if using Mac, not Linux or Windows?
Mac is Unix based system, so it should have similar commands with Linux
Hi , what app do you use editing python script? And what OS ?
I use VS Code on Windows with WSL.
how can i make an .exe file without loosing my token.json?
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?
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 😂
@@michaelkeith5398 haha glad you figured it out.
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?
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.
you are a fucking king excellent tutorial
Hello. It takes forever to run the command, 'python script.py'. What can I fo?
Most of the slowness will be because of the API call to Google's servers. The library is just a wrapper around the API.
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?
what text editor are you using?
Visual Studio Code
B-R-I-L-L-I-A-N-T-!!!
how to add this data in a dataframe?
same question
I get SpreadsheetNotFound.
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
did not work for windows
so i need to pay $300 ?
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.
@@aneetakhoso384 im a noob, how did you do it? I still have to create the google cloud account I guess?
this is already out of date
Thank you for sharing. I followed and authorised everything, but still getting an error create_connectionsock.connetction(sa) error