Toloka documentation



Downloads assignments as pandas.DataFrame

Experimental method. Implements the same behavior as if you download results in web-interface and then read it by pandas.

Parameters Description

Parameters Type Description
pool_id str

From which pool the results are loaded.

status Optional[List[GetAssignmentsTsvParameters.Status]]

Assignments in which statuses will be downloaded.

start_time_from Optional[datetime]

Upload assignments submitted after the specified date and time.

start_time_to Optional[datetime]

Upload assignments submitted before the specified date and time.

exclude_banned Optional[bool]

Exclude answers from banned performers, even if assignments in suitable status "ACCEPTED".

field Optional[List[GetAssignmentsTsvParameters.Field]]

The names of the fields to be unloaded. Only the field names from the Assignment class, all other fields are added by default.

  • Returns:

    DataFrame with all results. Contains groups of fields with prefixes:

  • "INPUT" - Fields that were at the input in the task.

  • "OUTPUT" - Fields that were received as a result of execution.

  • "GOLDEN" - Fields with correct answers. Filled in only for golden tasks and training tasks.

  • "HINT" - Hints for completing tasks. Filled in for training tasks.

  • "ACCEPT" - Fields describing the deferred acceptance of tasks.

  • "ASSIGNMENT" - fields describing additional information about the Assignment.

  • Return type:



Get all assignments from the specified pool by pool_id to pandas.DataFrame. And apply the native pandas rename method to change columns' names.

answers_df = toloka_client.get_assignments_df(pool_id='1')
answers_df = answers_df.rename(columns={
    'INPUT:image': 'task',
    'OUTPUT:result': 'label',
    'ASSIGNMENT:worker_id': 'performer'