Export SQL Tables To Excel with Python

Поделиться
HTML-код
  • Опубликовано: 1 фев 2025

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

  • @Tom-td8cv
    @Tom-td8cv Год назад +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 Год назад +3

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

  • @pascal831
    @pascal831 Год назад +1

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

  • @CraftedTurbulence
    @CraftedTurbulence 3 месяца назад

    Hi bro, it's very helpful video. Would you illustrate the process when the rows to return (into multiple sheet) are beyond Excel's row limit per sheet?

    • @irfanshaikh262
      @irfanshaikh262 11 дней назад

      Excels wrokbook format ".xlsx" has a row limit of 1million. If you data exceeds this threshold the excel would crash or wouldn't simply allow resulting in pandas throwing an exception failing the program.
      You could export it in ".csv" format since it has no limit.
      Also to remember er if your data has big numeric values exceeding 8 digits, for example bank account number, use df = df.astype(str) before exporting it to csv or xlsx since excel would conver this number to scientific notation which most of us wouldn't want.
      Cheers

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

    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

  • @learnenglishcomputer2644
    @learnenglishcomputer2644 Год назад

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

  • @MaxMustermann-on2gd
    @MaxMustermann-on2gd Год назад

    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 Год назад

      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 Год назад

      @@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 Год назад

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

    • @shaurryabaheti
      @shaurryabaheti Год назад +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 Год назад

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

  • @AzureCz
    @AzureCz Год назад

    Really useful and interesting. thank you!

  • @muddyexport5639
    @muddyexport5639 Год назад

    Thanks!

  • @chriskeo392
    @chriskeo392 Год назад

    Thx king!

  • @lepezamajmune3965
    @lepezamajmune3965 Год назад

    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 Год назад +1

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

    • @lepezamajmune3965
      @lepezamajmune3965 Год назад

      @@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  11 месяцев назад +2

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

  • @b857
    @b857 Год назад

    migrate_to_best_database.mp4