Features.collect_buzzer_codes

Features.collect_buzzer_codes(confirmation_required=True, verbose=False)[source]

Collects data of buzzer codes from the source web page.

Parameters:
  • confirmation_required (bool) – Whether user confirmation is required before proceeding; defaults to True.

  • verbose (bool | int) – Whether to print relevant information to the console; defaults to False.

Returns:

A dictionary containing the data of buzzer codes and the date they were last updated, or None if no data is collected.

Return type:

dict | None

Examples:

>>> from pyrcs.other_assets import Features  # from pyrcs import Features
>>> feats = Features()
>>> buz_codes = feats.collect_buzzer_codes()
To collect data of Buzzer codes
? [No]|Yes: yes
>>> type(buz_codes)
dict
>>> list(buz_codes.keys())
['Buzzer codes', 'Last updated date']
>>> feats.KEY_TO_BUZZER
'Buzzer codes'
>>> buz_codes_dat = buz_codes[feats.KEY_TO_BUZZER]
>>> type(buz_codes_dat)
pandas.core.frame.DataFrame
>>> buz_codes_dat.head()
  Code [number of buzzes or groups separated by pauses]            Meaning
0                                                  1                  Stop
1                                                1-2           Close doors
2                                                  2        Ready to start
3                                                2-2     Do not open doors
4                                                  3              Set back