Sometimes, pure SQL isn't enough to manipulate data. Learn how to integrate Python with MySQL. Included is a tutorial on running queries in Python, manipulating data pulled from queries, and interacting with database objects.
- [Narrator] Now that I have my select query designed,…I need to create a table to store the median data.…Let's do that next.…So I'll open a new SQL tab…and create the table accident_medians…with the columns vtype as a hundred length for our car.…And severity as an integer.…I'll run that to create the table.…Refresh the accidents database.…
There's my accident medians table.…And I'll need a query that will insert data into this table.…So I will start by making my insert query.…Insert into accident_medians.…And the values keyword,…and he'll I'll enter in the values I'll want to insert.…I'm just going to do a quick test insert, and run that,…and check accident_medians again…and there's my test data.…Now to remove my test data I'm going to…right click on the accident_medians table…and truncate the table.…
Truncating removes all the values in the table…but keeps its structure intact.…So I'll just click truncate.…And now we'll attempt it again.…I'll take my insert query…and paste it into my Python script.…I'll assign it to a new string called insertSQL.…
- Strengths and weaknesses of MySQL
- Creating a database
- Joining data sets
- Integrating Python with MySQL
- Searching a database
- CRUD operations
- Performing calculations
Skill Level Appropriate for all
1. Data and MySQL in under Five Minutes
2. Create a Database
3. Join Two Datasets
4. Search a Database
Searching a database1m 51s
5. Create, Read, Update, and Delete Operations
6. Averages and Calculations
Next steps1m 1s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.