Export SQL Tables To Excel with Python

Поделиться
HTML-код
  • Опубликовано: 19 июн 2024
  • In this video, we learn how to export SQL database tables to Excel files using Python.
    ◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
    📚 Programming Books & Merch 📚
    🐍 The Python Bible Book: www.neuralnine.com/books/
    💻 The Algorithm Bible Book: www.neuralnine.com/books/
    👕 Programming Merch: www.neuralnine.com/shop
    💼 Services 💼
    💻 Freelancing & Tutoring: www.neuralnine.com/services
    🌐 Social Media & Contact 🌐
    📱 Website: www.neuralnine.com/
    📷 Instagram: / neuralnine
    🐦 Twitter: / neuralnine
    🤵 LinkedIn: / neuralnine
    📁 GitHub: github.com/NeuralNine
    🎙 Discord: / discord
    Timestamps:
    (0:00) Intro
    (0:17) Creating Sample Database
    (4:56) Exporting Table To Excel
    (6:52) Outro
  • НаукаНаука

Комментарии • 22

  • @Tom-td8cv
    @Tom-td8cv 4 месяца назад +3

    Great vid - although it’s worth mentioning this isn’t going to work if you’ve got a huge table. First from the perspective of running out of ram (loading it in), but then from the 1million row limit in excel on the export

  • @krzysiekkrzysiek9059
    @krzysiekkrzysiek9059 4 месяца назад +3

    That kind of content is awesome and so useful. Do export Excel to SQL Tabels as next please.

  • @pascal831
    @pascal831 4 месяца назад +1

    @NeuralNine Thanks Brother! I started learning SQL and needed this right now! Cheers!

  • @AzureCz
    @AzureCz 4 месяца назад

    Really useful and interesting. thank you!

  • @muddyexport5639
    @muddyexport5639 4 месяца назад

    Thanks!

  • @chriskeo392
    @chriskeo392 4 месяца назад

    Thx king!

  • @learnenglishcomputer2644
    @learnenglishcomputer2644 4 месяца назад

    can you help me predict the next series of numbers if i give you the previous 30 numbers by using python and ML? please

  • @olaibrahim8121
    @olaibrahim8121 2 месяца назад

    Hi, If I have about 500 PDFs of financial statements and I want Python to import them and analyze the text readability ( I have seen your video on that topic), how to import the PDFs and understand that they belong to different companies in different years, thanks

  • @MaxMustermann-on2gd
    @MaxMustermann-on2gd 4 месяца назад

    What am I missing, since when do you pass arguments with a : instead of = ? What is the Advantage of one over the other? And why is both mixed in this video?
    For example: pd.read_sql_query(sql: ..., index= ...)

    • @isaacdruin
      @isaacdruin 4 месяца назад

      Pretty sure it's supposed to be = in both instances. I'm no Python expert, but all that's passed in to the first argument is the query string. If you know the parameters and pass them in the correct order, you don't need to assign them at all.
      pd.read_sql_table("data", conn)
      ^ works without any assignment, per the pandas docs.

    • @MaxMustermann-on2gd
      @MaxMustermann-on2gd 4 месяца назад

      @@isaacdruin yes thats why i am wondering. He also did the same thing with the insert query when passing the _sql param to cursor.execute()

    • @isaacdruin
      @isaacdruin 4 месяца назад

      @@MaxMustermann-on2gd everything outside the quotation marks is likely just being ignored, considering he passes the params in the correct order.

    • @shaurryabaheti
      @shaurryabaheti 4 месяца назад +1

      It's not him doing it it's just the stupid pycharm showing him what the provided argument will be used as in the function

    • @MaxMustermann-on2gd
      @MaxMustermann-on2gd 4 месяца назад

      @@shaurryabaheti oooooh, i see. I thought he typed it in that way.

  • @lepezamajmune3965
    @lepezamajmune3965 4 месяца назад

    Why would you want to do this? All sql databases have a way to export tables to csv and it's usually very simple to do

    • @isaacdruin
      @isaacdruin 4 месяца назад +1

      Maybe you're writing an API where the user doesn't have direct access to the database?

    • @lepezamajmune3965
      @lepezamajmune3965 4 месяца назад

      @@isaacdruin I didn't think of that. If you're writing an API it makes a lot of sense to do this since those built in export to csv commands copy the result to a file on the file system of the server

    • @NeuralNine
      @NeuralNine  4 месяца назад +2

      Also, believe it or not, a lot of business people really want to have everything as an Excel file.

  • @b857
    @b857 4 месяца назад

    migrate_to_best_database.mp4