Split a pandas dataframe using unique; Render as separate tables in Jinja2
问题 I'm working on a project wherein I load a .csv file into a pandas dataframe and make a .PDF report, using Python 3.6 + pandas + jinja2 + weasyprint. csv -> pandas -> jinja2 -> weasyprint Here's my challenge: One of pandas dataframes contains info that I want to split by the unique entries in one of its columns, and then display separate tables in jinja2 for each of those splits. Sample dataframe: Clothing Color Size 0 Shirt Blue M 1 Shirt Blue L 2 Shirt Black L 3 Pants Black L 4 Pants Blue XL