format_confirmation_prompt

pyrcs.utils.format_confirmation_prompt(data_name, initial=None, ending='\n?')[source]

Returns a message for comfirming whether to proceed to collect a certain cluster of data.

Parameters:
  • data_name (str) – The name of the dataset to be collected, e.g. "Railway Codes".

  • initial (str | None) – The initial letter for the code; defaults to None.

  • ending (str) – The ending of the confirmation message; defaults to "\n?".

Returns:

A confirmation message asking whether to proceed with the dataset collection.

Return type:

str

Examples:

>>> from pyrcs.utils import format_confirmation_prompt
>>> prompt = format_confirmation_prompt(data_name="Railway Codes")
>>> print(prompt)
To collect data of Railway Codes
?
>>> prompt = format_confirmation_prompt(data_name="location codes", initial="A")
>>> print(prompt)
To collect data of location codes beginning with "A"
?