Skip to content

Tag: excel

How to extract Excel PivotCache into Pandas Data Frame?

First time posting here, I apologize if this question has been asked before – I can’t find anything that applies. Is there a way to read the underlying data from an Excel PivotTable into a Pandas Data Frame? For several years I’ve had an Excel Auto_Open macro that downloads several Excel fil…

Pandas: Remove Column Based on Threshold Criteria

I have to solve this problem: Objective: Drops columns most of whose rows missing Inputs: 1. Dataframe df: Pandas dataframe 2. threshold: Determines which columns will be dropped. If threshold is .9, the columns with 90% missing value will be dropped Outputs: 1. Dataframe df with dropped columns (if no column…

Python: Open Excel file with win32

My code was working yesterday but today when I tried running it again it threw me an error and I’ve try to figure this out but I couldn’t. Hope you can help me out here. Thanks much! And this is the error the system threw: —> 11 wb = excel.Workbooks.Open(file) com_error: (-2147352567, &#8…