Skip to content

Fix EventsDict with duplicated keys

Benoit Seignovert requested to merge fix-events-dict-init-keys into main
EventsDict([
    EventWindow('FOO', t_start='2035-01-01', t_end='2035-01-02'),
    EventWindow('FOO', t_start='2035-01-03', t_end='2035-01-04'),
])
event # t_start t_stop
0 FOO 2 2035-01-01 2035-01-04
  • Add as_dict=True optional in Events find()/before()/after()/between()methods to enforceEventsDict` type return:
timeline.find('^IO', as_dict=True)
event # t_start t_stop
0 IO_TRANSIT 608 2031-01-20 2034-12-16
timeline.find('^IO').before('2031-01-21', as_dict=True)
event # t_start t_stop
0 IO_TRANSIT - 2031-01-20 2031-01-20

Merge request reports