Closed ikanashov closed 2 years ago
The issue is caused by the implementation of todataframe()
calling list()
on the table. The list
constructor in turns calls __len__()
(twice, the second indirectly through __length_hint__()
) and the implementation of __len__()
for Petl objects is to iterate the table to get its length.
The issue is solved avoiding to call list()
from todataframe()
or to call list(iter(table))
instead. I'll prepare a PR later.
Minimal, reproducible code sample, a copy-pastable example if possible
Problem description
When convert petl.Table to pandas.dataFrame lambda function in addfield run three times
Version and installation information