{"library":"pretty-html-table","title":"Pretty HTML Table for Pandas DataFrames","description":"pretty-html-table (v0.9.16) is a Python library designed to convert pandas DataFrames into aesthetically pleasing HTML tables, primarily for use in email reports. It offers 12 different color themes and formats HTML at the DataFrame row level to ensure broad compatibility across various email providers, avoiding common CSS rendering issues. The library is currently in maintenance mode with infrequent releases, with the last significant update in April 2022.","language":"python","status":"maintenance","last_verified":"Fri May 15","install":{"commands":["pip install pretty-html-table"],"cli":null},"imports":["from pretty_html_table import build_table"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import pandas as pd\nfrom pretty_html_table import build_table\n\n# Create a sample pandas DataFrame\ndata = {\n    'Name': ['Alice', 'Bob', 'Charlie'],\n    'Age': [24, 27, 22],\n    'City': ['New York', 'Los Angeles', 'Chicago']\n}\ndf = pd.DataFrame(data)\n\n# Convert the DataFrame to a pretty HTML table with a 'blue_light' theme\nhtml_table = build_table(df, 'blue_light', width='auto', font_size='medium', text_align='left')\n\n# Print the HTML table (for demonstration)\nprint(html_table)\n\n# Optionally, save to an HTML file\n# with open('pretty_table.html', 'w') as f:\n#    f.write(html_table)\n# print(\"HTML table saved to pretty_table.html\")","lang":"python","description":"This quickstart demonstrates how to create a pandas DataFrame and then convert it into a styled HTML table using `build_table`. The resulting HTML string can be printed, saved to a file, or embedded directly into an email body.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-15","installed_version":"0.9.16","pypi_latest":"0.9.16","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":7.6,"avg_import_s":0,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"pretty-html-table","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0,"mem_mb":0,"disk_size":"164.6M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"pretty-html-table","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":7.4,"import_time_s":0,"mem_mb":0,"disk_size":"157M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"pretty-html-table","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0,"mem_mb":0,"disk_size":"177.2M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"pretty-html-table","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":7.1,"import_time_s":0,"mem_mb":0,"disk_size":"169M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"pretty-html-table","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0,"mem_mb":0,"disk_size":"162.5M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"pretty-html-table","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":7.4,"import_time_s":0,"mem_mb":0,"disk_size":"154M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"pretty-html-table","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0,"mem_mb":0.2,"disk_size":"161.5M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"pretty-html-table","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":7.4,"import_time_s":0,"mem_mb":0,"disk_size":"153M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"pretty-html-table","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0,"mem_mb":0,"disk_size":"172.4M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"pretty-html-table","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":8.9,"import_time_s":0,"mem_mb":0,"disk_size":"167M"}]}}