So a collection of records has been created using awkward.zip
;
import awkward
pineapple = awkward.from_iter([3, 4])
tofu = awkward.from_iter([5, 6])
pizza = awkward.zip({"pineapple": pineapple, "tofu": tofu})
I'd like to remove one of the records/fields from the collection I'm working with. My first thought is to do del pizza['pineapple']
, but that doesn't work. I could do;
pizza = awkward.zip({name: pizza[name] for name in awkward.fields(pizza)
if name != 'pineapple'})
But I'm wondering if there is something more efficient I could be doing.
I'm not trying to delete the object pineapple
, just remove the reference to it in the pizza
.