Automate Excel Reporting with Python! Combine Workbooks and Add Charts with Pandas and Openpyxl

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ก.ย. 2024

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

  • @sandervalentijn6471
    @sandervalentijn6471 2 ปีที่แล้ว

    Dude, another great video. This is going into my reference playlist as it will be very usefull. Love the ‘os’ use here, which looks more versatile than glob, which I used before.

    • @datagy
      @datagy  2 ปีที่แล้ว

      Thanks so much, Sander!

  • @karolyna6028
    @karolyna6028 5 หลายเดือนก่อน

    nice!

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

    Hi when I did "ws.insert_rows(0, 3)", I got "AttributeError: 'Worksheet' object has no attribute 'insert_rows'

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

      NVM - I figured it out. I had to update my pyxl module

  • @user-rz7ko4rc5q
    @user-rz7ko4rc5q ปีที่แล้ว

    Thanks you, but how can I edit lebel on the charts, and hide grid ?

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

    Thank you for the great video. by any chance do you know how to customize the chart style?
    I have tried to use
    chart.style = 23 to change it. However, even though I loop out all the available styles, there is no one same as the one I manually created from my excel.

    • @datagy
      @datagy  2 ปีที่แล้ว

      Hi Ning! Thanks for your comment :)
      That should technically work. You can add additional customization by using the additional styling options covered here: openpyxl.readthedocs.io/en/stable/charts/pattern.html
      Let me know if you have any questions!

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

    Hello, is there a way to summarize the Excel data using Excel's pivot table by Python?

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

      Hey there! Yep but you’d need to use different libraries such as pywin32 :)

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

    Thank you for another excellent video. I was wondering if the same can be done with shutil, learning from your other video of renaming files. Are there any pros and cons or can we use both the use os module say for listdir and the shutil for finding out the name of the file. Are there any best practices for the which module to use or the number of modules to use.
    BTW what's the colorscheme you are using in VSCODE

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

      Hi Tridib! Thanks for your comment :)! That's a great question. The shutil library, as far as I know, doesn't support listing out the files in the same way (it's more meant for moving and copying files).
      I think it's a great point though - there are a good number of libraries to do similar things. For example, the Pathlib library provides a more object-oriented approach. I'd say, choose one that you like the format of and use that one :)
      The theme is Github Dark Dimmed: Name: marketplace.visualstudio.com/items?itemName=GitHub.github-vscode-theme which is probably my fav theme!

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

      ​@@datagy You are right I got mixed up between shutil and Pathlib. Thank you for your briiliant practical videos and sharing your knowledge with noobs like me

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

    For me, the most annoying thing when automating Excel with Python is to AutoFit the columns. Every now and then the code just crashes. If there's a simple option for that in future videos, I'll apreciate it.

    • @datagy
      @datagy  2 ปีที่แล้ว

      Interesting! I’ll take a look at it :)