Package PyFoam :: Package Basics :: Module CSVCollection :: Class CSVCollection
[hide private]
[frames] | no frames]

Class CSVCollection

source code


Collects data like a dictionary. Writes it to a line in a CSV-file. If the dictionary is extended the whole file is rewritten

Instance Methods [hide private]
 
__call__(self, usePandas=True)
Return the data as a pandas-Dataframe
source code
 
__init__(self, name=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__makeSimple(self, v) source code
 
__setitem__(self, key, value)
Sets a value in the current dataset
source code
 
clear(self)
Resets the last line
source code
 
write(self)
Writes a line to disk and starts a new one
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__call__(self, usePandas=True)
(Call operator)

source code 

Return the data as a pandas-Dataframe

Parameters:
  • usePandas - whether data should be returned in pandas-format. Otherwise numpy

__init__(self, name=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • name - name of the file. If unset no file will be written (only data collected)
Overrides: object.__init__

__setitem__(self, key, value)
(Index assignment operator)

source code 

Sets a value in the current dataset

Parameters:
  • key - the key
  • value - and it's value