`convertall` does not work when table header has non-string elements
dnicolodi opened this issue · 0 comments
dnicolodi commented
Minimal, reproducible code sample, a copy-pastable example if possible
t = [['foo', 11, 22], [2, 2, 2]]
petl.convertall(t, lambda x: x**2)
Problem description
convertall()
uses head()
to access the field names, but this returns the header as is and the filed names are not usable if they are not strings. I think it should be using fieldnames()
instead. The same bug affects other functions implemented on top of convertall()
.
Version and installation information
This is observed with petl 1.7.4 but the current git head contains the same implementation of convertall()
.