mile_chain_to_mileage¶
- pyrcs.converter.mile_chain_to_mileage(mile_chain)[source]¶
Converts <miles>.<chains> to <miles>.<yards>.
- Parameters:
mile_chain (str | numpy.nan | None) – Mileage data presented in the form of <miles>.<chains>.
- Returns:
The corresponding mileage in the form of ‘<miles>.<yards>’.
- Return type:
str
Examples:
>>> from pyrcs.converter import mile_chain_to_mileage >>> # AAM 0.18 Tewkesbury Junction with ANZ (84.62) >>> mileage_data = mile_chain_to_mileage(mile_chain='0.18') >>> mileage_data '0.0396' >>> # None, nan or '' >>> mileage_data = mile_chain_to_mileage(mile_chain=None) >>> mileage_data ''