News for hackers. Stuff that matters.
Re:Advanced Python Mastery – A Course by David Beazley by felixhummel on Wednesday July 19, 2023 @11:13AM (#36787811)
If there is no library for your case like pandas (or even csv.DictReader), you could always use an iterator:

    def iter_portfolio(rows):
         for row in rows:
             yield {'name': row[0]}
    
    rows = ...
    portfolio = list(iter_portfolio(rows))

There are no comments on this comment yet.