While using COM, pivot tables need to be created "in Excel, by Excel". I have used xlwings (which, at its core, is a COM wrapper). The idea is to create a pivot cache and use the pivot cache it to generate the pivot table.
import xlwings as xw
from xlwings import constants
wb = xw.Book.caller()
pivot_table = xw.sheets.add(name='Pivot Table', after='Sheet1')
PivotTableName = 'ReportPivotTable'
PivotCache = wb.api.PivotCaches().Create(SourceType=constants.PivotTableSourceType.xlDatabase, SourceData=PivotSourceRange.api, Version=constants.PivotTableVersionList.xlPivotTableVersion14)
PivotTable = PivotCache.CreatePivotTable(TableDestination="'Pivot Table'!R1C1", TableName=PivotTableName, DefaultVersion=constants.PivotTableVersionList.xlPivotTableVersion14)
PivotTable.PivotFields('Last Name').Orientation = constants.PivotFieldOrientation.xlRowField
PivotTable.PivotFields('Last Name').Position = 1
PivotTable.PivotFields('Project Code').Orientation = constants.PivotFieldOrientation.xlRowField
PivotTable.PivotFields('Project Code').Position = 2
PivotTable.PivotFields("total").Orientation = constants.PivotFieldOrientation.xlDataField
When I was doing this I found the Microsoft help for pivot tables invaluable.