Getting an Excel CSV into a SQLITE database using Python

preview_player
Показать описание
This video walks through the simple code needed to get an excel CSV converted to a SQLITE database.

Learn the additional code needed to protect the SQLITE database from a bad API call:

To specify a column as a primary key, type PRIMARY KEY right after the data type declaration of the desired column in the dtypes parameter. For example, if i wanted Date to be a primary key, I would've typed {'Dates':'real PRIMARY KEY'} Here is a Stack Overflow article which discusses it.

8:09 testing on a large dataset indicates that it will attempt to "detect" the appropriate datatype. If you want to override one of these detected dtypes, you can use the dtype parameter to just specify which columns you want to change. You do not have to list all the columns in the dtype variable. Some additional info on the dtype parameter: you CAN use lower case, the types are not case sensitive. If you make a spelling error, it will default to a BLOB type.
Рекомендации по теме
Комментарии
Автор

To specify a primary key, type PRIMARY KEY after specifying the data type in the dtypes parameter.

AndrewMagee
Автор

8:09 testing on a large dataset indicates that it will attempt to "detect" the appropriate datatype. If you want to override one of these detected dtypes, you can use the dtype parameter to just specify which columns you want to change. You do not have to list all the columns in the dtype variable. Some additional info on the dtype parameter: you CAN use lower case, the types are not case sensitive. If you make a spelling error, it will default to a BLOB type.

AndrewMagee
Автор

This is amazing. Thank you for making the video!!

siddharthadas
Автор

Very Nice video to upload CSV file into database nice work mate!!!

krishmotla
visit shbcf.ru