Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed SQLAlchemy Basics!
You have completed SQLAlchemy Basics!
Preview
Import the CSV of books into your application.
Code Snippet
months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
Challenges
- What if the CSV file’s date and/or price are not in the correct format?
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
adding our CSV of books to our database.
0:00
We're gonna create a new
function called add CSV,
0:01
and add it before our app function here
0:06
Okay, let me make sure I have two spaces,
perfect.
0:13
def add_csv
0:16
Inside of this function, we're gonna
grab all of the books in our CSV.
0:22
We're gonna clean the data, and
then add that information to our database.
0:26
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up