Create and Query SQL Database with Python | SQL and Pandas




[ad_1]

In this video you will learn how to create and query an sql database with pandas

Learn how to build a machine learning API that connects to a back end machine learning model and returns a response based on feedback from the ML model.

πŸ‘‰ Patreon: patreon.com/SATSifaction
πŸ‘‰ Facebook Group: http://facebook.com/groups/theaiwarriors
πŸ‘‰ Instagram: @theaiwarriors
πŸ‘‰ Corporate Training and Up skilling: https://levers.ai

Netfirms (Affiliate) – https://bit.ly/2KdJ4Dp
Bluehost (Affiliate) – https://bit.ly/2GxxBh1
Heroku – https://www.heroku.co
NordVPN (Affiliate) – https://bit.ly/2W87je0

βœ… Here is a link to my python for beginners, master python course: https://bit.ly/2HIZS42

What Does a Data Science Executive Carry Around in 2019?

Bag – https://amzn.to/2HfHkJo (will fit laptop plus one tablet and a few accessories)
Laptop – 2018 MacBook Pro with Touch Bar
Tablet – 2017 9.7” iPad or
Tablet – Amazon Fire HD 10 – https://amzn.to/2HjeLec
Folding Keyboard – https://amzn.to/2JLMbE7
Power Bank – https://amzn.to/2VsNASc
Bose QC35 – https://amzn.to/2LEpqEx

Home Setup for more intense analysis and editing:

AMD MSI Vega 56 Graphics Card – https://amzn.to/2HkiJU1
Razor X Core egpu with thunderbolt 3 – https://amzn.to/2Hix579
Two LG 29” Ultrawide Monitors – https://amzn.to/2YtZfSi

Other options to run Python on a budget

Raspberry Pi Starters kit – https://amzn.to/2Q4lzPE
Any inexpensive Android Tablet (all Fire tablets with playstore side loaded)
Minimalist Keyboard and Mouse – https://amzn.to/2Q2w2ek

Favourite Mobile Apps to Run Python and Code
iOS – Pythonista (paid) – https://apple.co/2HjRVTJ
Android – Dcoder (free) – https://bit.ly/2Vrjb6N

Music:

Finally by Loxbeats https://soundcloud.com/loxbeats
Creative Commons β€” Attribution 3.0 Unported β€” CC BY 3.0
Free Download: http://bit.ly/FinallyLoxbeats
Music promoted by Audio Library https://youtu.be/fGquX0Te1Yo

Source


[ad_2]

Comment List

  • SATSifaction
    December 16, 2020

    I have been trying to replicate the code with a excel file that has spaces in the name and it is crashing. How can I compensate for a sheet that has headers with spaces in the file?

  • SATSifaction
    December 16, 2020

    Hi ..i have tried the same code but my data has varchar and integers along with date data types .. i see this error
    "InterfaceError: Error binding parameter 6 – probably unsupported type."

    any solution please

  • SATSifaction
    December 16, 2020

    getting "OperationalError: near ".": syntax error" when running: c.execute("CREATE TABLE IF NOT EXISTS sales ({})".format(' ,'.join(df.columns)))

  • SATSifaction
    December 16, 2020

    hi sir, thank you for this vedio ,
    but as Iam new in python and data base so I am not able to solve this error : OperationalError: near "DATE": syntax error which is occurring as i execute this code
    import sqlite3

    import pandas as pd

    conn = sqlite3.connect('xldb.db')

    df = pd.read_excel('Option.xlsx')

    c = conn.cursor()

    c.execute("CREATE TABLE IF NOT EXISTS xldbdata ({})".format(','.join(df.columns)))

    #to check how many row and colum are ther we use (df.shape)

    # it will iterate all rows and columns

    for row in df.iterrows():

    sql = 'INSERT INTO xldbdata ({}) VALUES ({})'.format(','.join(df.columns), ','.join(['?']*len(df.columns)))

    c.execute(sql, tuple(row[1]))

    conn.commit()

    con.close()
    so if it is possible please suggest . thank you

  • SATSifaction
    December 16, 2020

    great thank you so much! very helpful

  • SATSifaction
    December 16, 2020

    Very on point video! Exactly what I was looking for as a guide for my programming assignment πŸ™‚ But I have a question, how would I assign data types for each of the columns? Thanks in advance.

  • SATSifaction
    December 16, 2020

    While I let this code run: 'c.execute('CREATE TABLE IF NOT EXISTS sales ({})'.format(' ,'.join(df.columns)))' , the system of jupyter notebook responsed me the message of error: ' OperationalError: unrecognized token: ":" ' .
    How could I solve this problem?

  • SATSifaction
    December 16, 2020

    Awesome video! I just started a new job and have so much different data coming from excels and csv's, that I was looking for a quick way to get it all into SQL. Question: what are the datatypes that get set into sqllite? Are all the columns shown as strings?

  • SATSifaction
    December 16, 2020

    This channel is really underrated. Very simple, concise, and direct to the point. This is what the people need.

Write a comment