[Tutor] Python excel filter

Alan Gauld alan.gauld at btinternet.com
Mon Oct 26 10:57:20 EDT 2015


On 26/10/15 12:21, Lucas Mascia wrote:
> Hello,
>
> I would like some guidance in a way to filter data from an excel sheet
> (.xlsx)
>
> I will be exporting an extensive table from a website with 400x20 infos. In
> this sheet, I need to apply 3 or 4 filters and collect the amount of info
> it shows then. Eg.:
>
> 1 - Export .xlsx from website

Can you export to CSV instead? Its much easier to work with CSV files 
using the standard library than to use Excel sheets natively. There are 
Excel modules that you can download but CSV is standard functionality 
and Excel CSV format is the default.

> 2 - Run python to filter
> 2.1 - Filter by client A
> 2.2 - Filter by task A
> 2.3 - Filter by Person A

Thats pretty meaningless without knowing the format of the tables.

> 3 - Repeat filter for different clients, tasks and persons

I'm not sure what you mean by "repeat filter" can you elaborate?

> 4 - Collect the amount each person does inside each client.

What do you mean "the amount"? Is that a column in the table
or are you meaning a count of the number of entries by user?

Without a view of the table format its hard to be any more specific.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list