Features.fetch_buzzer_codes¶
- Features.fetch_buzzer_codes(update=False, dump_dir=None, verbose=False)[source]¶
Fetches the data of buzzer codes.
- Parameters:
update (bool) – Whether to check for updates to the package data; defaults to
False
.dump_dir (str | None) – The path to a directory where the data file will be saved; defaults to
None
.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
- Return type:
dict
Examples:
>>> from pyrcs.other_assets import Features # from pyrcs import Features >>> feats = Features() >>> buz_codes = feats.fetch_buzzer_codes() >>> 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