News for hackers. Stuff that matters.
Re:Show HN: sheet2dict – simple Python XLSX/CSV reader/to di... by impoppy on Wednesday April 21, 2021 @09:04AM (#26889121)
It’d be better to use namedtuple to avoid repeating same dictionary keys imo
Re:Show HN: sheet2dict – simple Python XLSX/CSV reader/to di... by pytlicek on Wednesday April 21, 2021 @09:53AM (#26889694)
I know what you mean. Now it returns a field with dictionaries. Repeating keys as such is not possible and this is the desired state. But yes, with namedtuple you could manoeuvre more and add line numbers for example. Good idea, I'll think about it in the future.