SQL Databases with Pandas and Python - A Complete Guide

preview_player
Показать описание
In this Python tuturial we talk all about connecting to SQL Databases with Python and Pandas. Python is the swiss army knife of data anaylsis, and relational databases are the most common way data is stored at small and large companies. Learning how to best connect the two is an essential skill for any data professional.

Timeline:
00:00 Intro
01:02 Setting up A Toy Database with Docker
02:35 DBMS to Pull Data
04:55 Querying Data via Python API
08:35 Querying with Pandas read_sql
11:24 Writing data with Pandas to_sql

Check out my other videos:

Links to my stuff:
Рекомендации по теме
Комментарии
Автор

I like the way you started with low level examples and made your way to more practical high level stuff. Thanks.

Xnozea
Автор

Thanks Rob! my understanding of databases and Python improves everytime I watch your videos! Keep going!

_isDev
Автор

Hey Rob! Been watching your channel for a while and it’s both super helpful and interesting! Thank you very much for bringing this type of content to Youtube!

tomasrubinstein
Автор

Instantly liked and downloaded to watch offline. Your channel is pure gold🙏🙏🙏

molmock
Автор

First time watching one of your videos. Great job explaining the details of how the sql connection works, especially with SQLAlchemy. I have used SQLAlchemy alot and the details you provided were perfect for getting new users up and running. I will have to watch some more of your content in the future.

broteinstain
Автор

This is super helpful, I am a data analytics student, literally cant live without your channel and your contents. Thank you a million times and please keep up the good work! P.S: by any chance you can make a tutorial about Apache spark in python?

coneuer
Автор

I used to connect with databases via Sqlite3 and dump the data into a csv file. After that, I imported data using Pandas. But this tutorial spotted the light on other ways to do it in a straight forward manner. Thank you for sharing and keep up the good work!

My favorite singer is Rob Thomas, My favorite programmer is Rob Mulla!

othmanaitmaatallah
Автор

This is just a tutorial, but a quick note to anyone new to databases who is putting this into a production environment, your root password should not be just a dictionary word.

huntercoleman
Автор

Oh this is an amazing video to stumble onto!! Let me save this and trying to practice some database pulls. Thanks for the lesson!

charlie
Автор

Thank you sir. I like your tutorials a lot because they are usually short but the content is amazing🙏🙏

ayambasumailaimoro
Автор

You deserve way more views. I use a lot of what you say at work!

jdhouse
Автор

Thank you Rob!!

For a next video, LightGBM/XGBoost hyperparameter tunning would be amazing!!

jadelaossa
Автор

I was about to throw a brick at you when you used a for loop to read the database instead of using read_sql method! 🤣Great stuff as always!

alex_df
Автор

Great video as usual! Thank you for this. Do you perhaps consider doing a video on how to create cloud SQL databases for small (personal) project? I would love to see what is the best way to do it and access it with Python. If you also have some nice tools such as docker or beaverDB for this, that would be highly appreciated

jonathanhody
Автор

Very helpfull man,
Will see your all videos 👍

abhishekyadav
Автор

Nice summary to a pattern that took me bit to figure out myself awhile ago! I'd add that it may have been worth mentioning use of a context handler for the connection, but I suppose the pandas pattern is preferred b/c it already does that.

scottbrewer
Автор

Thank you Rob for making this video! I am interested in learning to save data frames/excel/csv to MSSQL i.e saved on AWS EC2 using Python(Jupyter notebook). The script I am running is getting lots of connection error. Looking forward to the video on the topic.

akankshasinha
Автор

Amazing video, this helped a lot, thanks

gustavollanos
Автор

This was amazing I thing you should do an official tutorial one day.

ZeuSonRed
Автор

I use sqlalchemy every day. It’s great. I would caution if your going to to_sql to create, make sure all the df columns are formatted the way they should be. You can get some wonky values in the created db table if you don’t.

andybecker
join shbcf.ru