add_records

negmas.helpers.add_records(file_name, data, col_names=None, raise_exceptions=False)[source]

Adds records to a csv file

Parameters
  • file_name (Union[str, PathLike]) – file name

  • data (Any) – data to use for creating the record

  • col_names (Optional[list[str]]) – Names in the data.

  • raise_exceptions – If given, exceptions are raised on failure

Return type

None

Returns

None

Remarks:

  • If col_names are not given, the function will try to normalize the input data if it was a dict or a list of dicts