datascience.tables.Table.pivot

Table.pivot(columns, rows, values=None, collect=None, zero=None)[source]

Generate a table with a column for rows (or a column for each row in rows list) and a column for each unique value in columns. Each row counts/aggregates the values that match both row and column.

columns – column label in self rows – column label or a list of column labels values – column label in self (or None to produce counts) collect – aggregation function over values zero – zero value for non-existent row-column combinations