Open zuzanna-maria opened 1 year ago
Do you have a simple code snippet to speed up reproducing the bug and also for adding an automated test case for avoiding further regression?
The code snippet I used is the one provided in the documentation.
Not sure where the problem is exactly.
I noticed that field
is a *args
non-named list parameter instead of a tuple
parameter.
So this should fail:
import petl as etl
table = [['foo', 'bar'],
['a', 1, 1],
['b', 2, 2],
['b', 2, 3],
['b', 3, 3],
['c', 4, 4]]
some_fields = ( 'foo', 'bar' )
ok = etl.valuecounter(table, 'foo', 'bar' )
ok = etl.valuecounter(table, *some_fields ) # notice the * deconstruction operator
fails = etl.valuecounter(table, some_fields )
Is this the case?
Like it says in the title - trying to reproduce the example use for ValueCounter given in docs, works fine if field is given as single name/index, throws 'Unprintable FieldSelectionError' when trying to provide field argument as tuple.