from_dataframe#

eclypse.policies.replay.from_dataframe(dataframe, *, target, node_id_column='node_id', source_column='source', target_column='target', time_column='time', value_columns=None, node_ids=None, node_filter=None, edge_ids=None, edge_filter=None, missing='ignore', start_step=None, cyclic=False)[source]#

Build a replay policy from a dataframe-like object.

Parameters:
  • dataframe (Any) – DataFrame-like object convertible to replay records.

  • target (ReplayTarget) – Replay target, either "nodes" or "edges".

  • node_id_column (str) – Column containing node identifiers.

  • source_column (str) – Column containing edge source identifiers.

  • target_column (str) – Column containing edge target identifiers.

  • time_column (str) – Column containing replay steps.

  • value_columns (list[str] | tuple[str, ...] | None) – Optional explicit columns to copy from records.

  • node_ids (list[str] | None) – Optional explicit node identifiers to mutate.

  • node_filter (NodeFilter | None) – Optional predicate receiving (node_id, data).

  • edge_ids (list[tuple[str, str]] | None) – Optional explicit edge identifiers to mutate.

  • edge_filter (EdgeFilter | None) – Optional predicate receiving (source, target, data).

  • missing (MissingPolicyBehaviour) – Behaviour when a replay record targets a missing item.

  • start_step (int | None) – Optional starting replay step.

  • cyclic (bool) – Whether to wrap past the final available replay step.

Returns:

Stateful replay policy.

Return type:

UpdatePolicy