cosapp.recorders.dataframe_recorder¶
Recorder in pandas.DataFrame.
Classes
|
Record data into a pandas.DataFrame. |
- class cosapp.recorders.dataframe_recorder.DataFrameRecorder(includes: str | List[str] = '*', excludes: str | List[str] | None = None, numerical_only=False, section='', precision=9, hold=False, raw_output=True)[source]¶
Bases:
BaseRecorder
Record data into a pandas.DataFrame.
Matching pattern are case sensitive and support the following special patterns:
Pattern
Meaning
*
matches everything
?
matches any single character
[seq]
matches any character in seq
[!seq]
matches any character not in seq
Excluding pattern are shadowing includes one; e.g. if includes=’*port_in.*’ and `excludes=’*.Pt’, for a port having variables named Tt and Pt, only Tt will be recorded.
- Parameters:
includes (str or list of str, optional) – Variables matching these patterns will be included; default ‘*’ (i.e. all variables).
excludes (str or list of str or None, optional) – Variables matching these patterns will be excluded; default None (i.e. nothing is excluded).
numerical_only (bool, optional) – Keep only numerical variables (i.e. number or numerical vector); default False.
section (str, optional) – Current section name; default ‘’.
precision (int, optional) – Precision digits when writing floating point number; default 9 (i.e. 10 figures will be written).
hold (bool, optional) – Append the new data or not; default False.
raw_output (bool, optional) – Raw output; default False.
..note:: – Do not mention inwards or outwards in includes or excludes list. Otherwise you may not record the wanted variables.