Create and Query SQL Database with Python | SQL and Pandas

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ก.ย. 2024
  • 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: / theaiwarriors
    👉 Instagram: @theaiwarriors
    👉 Corporate Training and Up skilling: levers.ai
    Netfirms (Affiliate) - bit.ly/2KdJ4Dp
    Bluehost (Affiliate) - bit.ly/2GxxBh1
    Heroku - www.heroku.co
    NordVPN (Affiliate) - bit.ly/2W87je0
    ✅ Here is a link to my python for beginners, master python course: bit.ly/2HIZS42
    What Does a Data Science Executive Carry Around in 2019?
    Bag - 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 - amzn.to/2HjeLec
    Folding Keyboard - amzn.to/2JLMbE7
    Power Bank - amzn.to/2VsNASc
    Bose QC35 - amzn.to/2LEpqEx
    Home Setup for more intense analysis and editing:
    AMD MSI Vega 56 Graphics Card - amzn.to/2HkiJU1
    Razor X Core egpu with thunderbolt 3 - amzn.to/2Hix579
    Two LG 29” Ultrawide Monitors - amzn.to/2YtZfSi
    Other options to run Python on a budget
    Raspberry Pi Starters kit - amzn.to/2Q4lzPE
    Any inexpensive Android Tablet (all Fire tablets with playstore side loaded)
    Minimalist Keyboard and Mouse - amzn.to/2Q2w2ek
    Favourite Mobile Apps to Run Python and Code
    iOS - Pythonista (paid) - apple.co/2HjRVTJ
    Android - Dcoder (free) - bit.ly/2Vrjb6N
    Music:
    Finally by Loxbeats / loxbeats
    Creative Commons - Attribution 3.0 Unported - CC BY 3.0
    Free Download: bit.ly/FinallyL...
    Music promoted by Audio Library • Finally - Loxbeats (No...

ความคิดเห็น • 25

  • @theyvesyves1609
    @theyvesyves1609 4 ปีที่แล้ว +11

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

    • @SATSifaction
      @SATSifaction  4 ปีที่แล้ว

      Thank you 🙏

    • @cu806
      @cu806 4 ปีที่แล้ว

      @@SATSifaction thank you for this? Is it possible if to drop users in a text file from a database role in an Oracle database?

  • @truckstomotorcycleswithtom3197
    @truckstomotorcycleswithtom3197 3 ปีที่แล้ว +1

    Had a problem, got it worked out. This has been very helpful.

  • @pedro_em_bra4199
    @pedro_em_bra4199 3 ปีที่แล้ว +1

    great video, exactly what I am looking for

  • @torque6389
    @torque6389 3 ปีที่แล้ว +1

    Seriously, you have some great videos!

  • @ganigeybullayev8344
    @ganigeybullayev8344 2 ปีที่แล้ว +1

    Very important video thanks

  • @vrino223
    @vrino223 4 ปีที่แล้ว

    great thank you so much! very helpful

  • @marianlipana5528
    @marianlipana5528 4 ปีที่แล้ว

    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.

  • @datagonia
    @datagonia 3 ปีที่แล้ว

    Instead of using string formatting, would it be okay to use an f-string? (for simpler syntax)

  • @anthonyalvarez5781
    @anthonyalvarez5781 4 ปีที่แล้ว +1

    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
      @SATSifaction  4 ปีที่แล้ว +1

      SQLite is basically a form of sql. Data is stored by data type whether that’s text, int, date etc. It’s just a database. Since you started a new job and have a lot of excel, keep a look out later today and I got a vid coming out on exposing excel data to an Api in 10 lines of easy code. Pretty neat stuff

    • @cu806
      @cu806 4 ปีที่แล้ว

      SATSifaction Thank you sir. Can we adapt this same logic for Oracle databases using cx_oracle package?

  • @poornima890
    @poornima890 4 ปีที่แล้ว

    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

  • @thriftymarketing
    @thriftymarketing 4 ปีที่แล้ว

    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?

  • @goodness8895
    @goodness8895 4 ปีที่แล้ว

    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
      @SATSifaction  4 ปีที่แล้ว +1

      You need to re-run jupyter and either open the notebook in the directory where the file is located or start a new file and copy and paste the code. I believe it means that you are opening a jupyter kernel without a token

    • @laalaajonsen
      @laalaajonsen 3 ปีที่แล้ว

      Just chiming in: I just tried this, and it helped by changing the python environment I was working in. I first used Anaconda with python 3.8, then i downgraded to pure Python 3.6. It could be as simple as a compatibility issue between package versions / python versions.

  • @Shubhamsingh-eg9qv
    @Shubhamsingh-eg9qv 4 ปีที่แล้ว

    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

  • @PRIYANKASharma-uv8lx
    @PRIYANKASharma-uv8lx ปีที่แล้ว

    Please made a video on jobless middle age woman no experience entry level Data analyst. How can we apply. What are the things needs to learn. Thanks

  • @edbull4891
    @edbull4891 ปีที่แล้ว

    sql = 'INSERT INTO salesdata ({}) VALUES ({})'.format(' ,'.join(df.columns), ' ,'.join(['?']*len(df.columns)))
    Returns an error >>>> InterfaceError: Error binding parameter 5 - probably unsupported type.

    • @edbull4891
      @edbull4891 ปีที่แล้ว

      Will NOT ACCEPT >>>>> datetime64[ns] types as input value !!!! So either del date col or change it to other type !!!!