utils

Provides a number of helper functions.

Validate inputs

is_homepage_connectable()

Checks and returns whether the Railway Codes website is reacheable.

is_str_float(x[, finite_only])

Checks if a string represents and can be converted to a finite float value.

validate_initial(initial[, as_is])

Validates if a value is a single ASCII letter.

validate_page_name(cls_instance, page_no, ...)

Retrieves the valid page name corresponding to a given page number.

get_collect_verbosity_for_fetch(data_dir, ...)

Creates a new parameter that indicates whether to print relevant information to the console.

get_batch_fetch_verbosity(data_dir, verbose)

Creates a new parameter that indicates whether to print relevant information to the console.

Save and retrieve pre-packed data

fetch_location_names_errata([k, regex, ...])

Fetches a dictionary or dataframe to rectify location names.