rc.task.results§

Functionality for processing results generated by ``rc``

Classes§

Collect

A device for collecting -- i.e. concatenating -- csv files across folders or folds.

Module Contents§

class Collect(csvs=None, folders=None, ignore_missing=False, **kwargs)§

A device for collecting – i.e. concatenating – csv files across folders or folds.

Parameters:
  • csvs (rc.base.definitions.Dict[str, rc.base.definitions.Dict[str, rc.base.definitions.Any]])

  • folders (rc.base.definitions.Dict[str, rc.base.definitions.Dict[str, rc.base.definitions.Any]])

  • ignore_missing (bool)

  • kwargs (rc.base.definitions.Any)

__call__(dst, is_existing_deleted=False, **kwargs)§

Collect self.csvs into dst. If and only if dst is a Repo, self.over_folds is called instead of self.over_folders.

Parameters:
  • dst (rc.base.definitions.Union[Repo, rc.base.definitions.Path, str]) – The destination folder, to house self.csvs or self.folders.

  • is_existing_deleted – Whether to delete and recreate an existing dst.

  • **kwargs (rc.base.definitions.Any) – Write options passed straight to pd.to_csv.

from_folders(dst, is_existing_deleted=False, **kwargs)§

Collect dst/[self.csvs] from self.folders.

Parameters:
  • dst (rc.base.definitions.Union[rc.base.definitions.Path, str]) – The destination folder, to house [self.csvs].

  • is_existing_deleted – Whether to delete and recreate an existing dst.

  • **kwargs (rc.base.definitions.Any) – Write options passed straight to pd.to_csv.

Return type:

Collect

Returns: ``self’’ for chaining calls.

from_folds(dst, is_existing_deleted=False, **kwargs)§

Collect dst/[self.folders] from Fold(dst, [k])/[self.folders] for k in self.Folds.

Parameters:
  • dst (Repo) – The destination folder, to house [self.folders].

  • is_existing_deleted – Whether to delete and recreate an existing dst.

  • **kwargs (rc.base.definitions.Any) – Write options passed straight to pd.to_csv.

Return type:

Collect

Returns: ``self’’ for chaining calls.