fix_num_stanox

pyrcs.utils.fix_num_stanox(stanox_code)

Fix ‘STANOX’ if it is loaded as numbers.

Parameters

stanox_code (str or int) – STANOX code

Returns

standard STANOX code

Return type

str

Examples:

>>> from pyrcs.utils import fix_num_stanox

>>> stanox = fix_num_stanox(stanox_code=65630)
>>> type(stanox)
str
>>> stanox
'65630'

>>> stanox = fix_num_stanox(stanox_code=2071)
>>> type(stanox)
str
>>> stanox
'02071'