PyFoam.Basics.CSVCollection module
Collects data and writes it to a CSV-file. Optionally return a pandas-data-frame
- class PyFoam.Basics.CSVCollection.CSVCollection(name=None)[source]
Bases:
objectCollects data like a dictionary. Writes it to a line in a CSV-file. If the dictionary is extended the whole file is rewritten
- __call__(usePandas=True)[source]
Return the data as a pandas-Dataframe :param usePandas: whether data should be returned in pandas-format. Otherwise numpy
- __dict__ = mappingproxy({'__module__': 'PyFoam.Basics.CSVCollection', '__doc__': '\n Collects data like a dictionary. Writes it to a line in a CSV-file.\n If the dictionary is extended the whole file is rewritten\n ', '__init__': <function CSVCollection.__init__>, '__setitem__': <function CSVCollection.__setitem__>, 'write': <function CSVCollection.write>, 'clear': <function CSVCollection.clear>, '__call__': <function CSVCollection.__call__>, '_CSVCollection__makeSimple': <function CSVCollection.__makeSimple>, '__dict__': <attribute '__dict__' of 'CSVCollection' objects>, '__weakref__': <attribute '__weakref__' of 'CSVCollection' objects>, '__annotations__': {}})
- __init__(name=None)[source]
- Parameters:
name – name of the file. If unset no file will be written (only data collected)
- __makeSimple(v)
- __module__ = 'PyFoam.Basics.CSVCollection'
- __setitem__(key, value)[source]
Sets a value in the current dataset :param key: the key :param value: and it’s value
- __weakref__
list of weak references to the object (if defined)