Depots.collect_1950_system_codes¶
- Depots.collect_1950_system_codes(confirmation_required=True, verbose=False)[source]¶
Collects 1950 system (pre-TOPS) 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 1950 system (pre-TOPS) 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 Depots # from pyrcs import Depots >>> depots = Depots() >>> s1950_codes = depots.collect_1950_system_codes() To collect data of 1950 system (pre-TOPS) codes ? [No]|Yes: yes >>> type(s1950_codes) dict >>> list(s1950_codes.keys()) ['1950 system (pre-TOPS) codes', 'Last updated date'] >>> depots.KEY_TO_1950_SYSTEM '1950 system (pre-TOPS) codes' >>> s1950_codes_dat = s1950_codes[depots.KEY_TO_1950_SYSTEM] >>> type(s1950_codes_dat) pandas.core.frame.DataFrame >>> s1950_codes_dat.head() Code Depot name Notes 0 1A Willesden From 1950. Became WN from 6 May 1973 1 1B Camden From 1950. To 3 January 1966 2 1C Watford From 1950. Became WJ from 6 May 1973 3 1D Devons Road, Bow Previously 13B to 9 June 1950. Became 1J from... 4 1D Marylebone Previously 14F to 31 August 1963. Became ME f...