4 ms·
Seconded. I use itertools constantly for data-wrangling on network server and web applications. Specifically: - processing files with imap and ifilter to rap
by shavenwarthog2 13y ago
Seconded. I use itertools constantly for data-wrangling on network server and web applications. Specifically:
- processing files with imap and ifilter to rapidly grab data, find a subset of it, then process it with a function
- defaultdict(list) is incredibly useful for collecting data, arranging it by a certain key (like date or object id), then collecting into a list
- namedtuple is occasionally useful for efficiently stuffing data into an object with a few named attributes.