📅 2023-07-27 — Session: Resolved DataFrame and PDF conversion errors
🕒 18:20–18:50
🏷️ Labels: Python, Dataframe, PDF, Ubuntu, Error Handling
📂 Project: Dev
⭐ Priority: MEDIUM
Session Goal:
The session aimed to address multiple programming challenges, including resolving a ValueError in DataFrame iteration, converting CSV files to LaTeX tables, and fixing PDF generation issues.
Key Activities:
- DataFrame Iteration: Fixed a
ValueErrorencountered during DataFrame iteration by switching fromitertuples()toiterrows(). - CSV to LaTeX Conversion: Explored methods to convert CSV files into LaTeX tables using Pandas and Tabulate libraries.
- CSV to PDF Conversion: Developed a script to convert multiple CSV files into a single PDF document with HTML table representation.
- Error Resolution: Solved integration errors between
pdfkitandwkhtmltopdf, including installation and configuration steps. - Ubuntu Architecture Guidance: Provided insights on selecting the correct Ubuntu architecture and version for various CPU types.
- wkhtmltox Installation: Guided through the installation of
wkhtmltoxon Ubuntu 22 usingdpkg. - HTML Encoding with Pandas: Discussed the importance of encoding in HTML generation using Pandas
to_html(). - PDF Encoding Issues: Addressed PDF encoding issues with
pdfkitby specifying UTF-8 encoding and ensuring font availability.
Achievements:
- Successfully resolved the DataFrame iteration error.
- Developed a functional script for CSV to PDF conversion.
- Installed and configured
wkhtmltoxon Ubuntu 22. - Clarified the process of handling encoding in HTML and PDF generation.