ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก

How to generate Reports with Python automatically - 3: HTML (with template) & HTML to PDF

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ส.ค. 2021
  • Welcome to our new Generate Reports with Python automatically series. You'll generate an example report in different formats.
    In this Part 3 video, we'll generate reports as HTML (without and with a template), and convert it to PDF.
    GitHub Repo with code: github.com/lia...
    Part 1: Overview
    Part 2: Excel
    ▶️Part 3: HTML (with template) & HTML to PDF
    Part 4: PDF directly
    Technologies that will be used
    ☑️ JupyterLab (Notebook)
    ☑️ pandas
    ☑️ Jinja2
    ☑️ WeasyPrint
    ☑️ FPDF
    Links mentioned in the video
    ►Jinja (templating engine) syntax: jinja.palletsp...
    ►Jinja loader: jinja.palletsp...
    There's also an article version of the same content. If you prefer reading, please check it out. How to generate Reports with Python (3 Formats/4 Tools): www.justintoda...
    Get access to more data science materials, check out our website Just into Data: justintodata.com/

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

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

    Just wanted to say thanks for this. Nothing else I could find gave me exactly what I was needing for what I'm working on. Thanks and great work!

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

      Glad we can help! Thank you for watching too.

  • @GurpreetSingh-kd4hi
    @GurpreetSingh-kd4hi ปีที่แล้ว

    Wonderful !

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

    Next content idea.
    FastApi!
    Database into web crud app using FastAPI and jinja templates
    Liked and subscribed!

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

    Thank you for this nice video.

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

    Great explanation! How to improve the table design?

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

      Thanks, Ariel. You can improve by changing HTML settings.

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

    How do I generate a table with sum values in python? Thanks.

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

    Nice content. Leant a lot. Just wondering how to generate python html report with the interactive plot which is clickable like plotly plot. Cheers

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

      Hi Ethan, it's going to be a lot more work. You probably should export the plotly chart as svg, and then try to embed that in html report. Also need to import plotly js library into html file.

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

      @@justintodata Thanks for your suggestion

    • @greg-ZE
      @greg-ZE 2 ปีที่แล้ว

      You can do this using plotly: fig.write_html("path/to/file.html"). Search "Interactive HTML Export in Python" for the doc on plotly's website. There are some additional settings you can use to slim the file down if you have an internet connection. I'm using that for viewing individual plots in an html file, but haven't figured out how to combine these interactive plots with other content (headings, lists, tables, other figures, etc.). You might be able to study the layout of the plotly-generated files and reproduce it in a template form like this video though. That's what I'm currently working on figuring out how to do...