LocationIdentifiers.collect_notes¶
- LocationIdentifiers.collect_notes(confirmation_required=True, verbose=False, raise_error=False)[source]¶
Collects the explanatory note related to multiple station codes (CRS codes) from the source web page.
- Parameters:
confirmation_required (bool) – Whether user confirmation is required; if
confirmation_required=True
(default), prompts the user for confirmation before proceeding with data collection.verbose (bool | int) – Whether to print relevant information to the console; defaults to
False
.raise_error (bool) – Whether to raise the provided exception; if
raise_error=False
(default), the error will be suppressed.
- Returns:
A dictionary containing the data of the multiple station codes explanatory note, or
None
if the note is not found or the collection is not performed.- Return type:
dict | None
Examples:
>>> from pyrcs.line_data import LocationIdentifiers >>> # from pyrcs import LocationIdentifiers >>> lid = LocationIdentifiers() >>> explanatory_notes = lid.collect_notes() To collect data of multiple station codes explanatory note ? [No]|Yes: yes >>> type(explanatory_notes) dict >>> list(explanatory_notes.keys()) ['Multiple station codes explanatory note', 'Notes', 'Last updated date'] >>> lid.KEY_TO_MSCEN 'Multiple station codes explanatory note' >>> explanatory_notes_ = explanatory_notes[lid.KEY_TO_MSCEN] >>> type(explanatory_notes_) pandas.core.frame.DataFrame >>> explanatory_notes_.head() Location CRS CRS_alt1 CRS_alt2 0 Ebbsfleet International EBD EBF 1 Glasgow Central GLC GCL 2 Glasgow Queen Street GLQ GQL 3 Heworth HEW HEZ 4 Highbury & Islington HHY HII XHZ