spyql icon indicating copy to clipboard operation
spyql copied to clipboard

Extend Dictionaries

Open dcmoura opened this issue 3 years ago • 0 comments

Add methods to NullSafeDict to help working with dicts:

  • [ ] dict.with(k, v): returns dict with new/updated pair
  • [ ] dict.drop(k1, k2, k3): return dicts without keys (does not fail if keys not found)
  • [ ] dict.withKeyRename(old_key, new_key): return dict with key renamed

Add method to allow using dicts on CSVs, etc:

  • [x] row / row(): constructs a dict over _values (and caches row to allow multiple calls). e.g. row->acolumn

dcmoura avatar Jun 29 '21 12:06 dcmoura