PyLamarr
Pythonizations for the ultra-fast simulation option for the LHCb experiment
 
Loading...
Searching...
No Matches
PyLamarr.loaders.PandasLoader.PandasLoader Class Reference

Ease loading a set of pandas DataFrames to the SQLite event model. More...

Public Member Functions

 __init__ (self, **to_sql_kwargs)
 
 __call__ (self, database)
 
 load (self, **dataframe_dict)
 Internal.
 

Protected Attributes

 _db
 
 _kwargs
 Override of the default values.
 

Detailed Description

Ease loading a set of pandas DataFrames to the SQLite event model.

As the other python test_data loaders, PandasLoader should be configured in the constructor. The configured object is then called during the event loop to pass the updated connection to the SQLamarr.SQLite3DB instance.

The configuration keyword-arguments passed to the constructor are passed to the pandas.DataFrame.to_sql function.

Some default values, however, is overridden as much more commonly adopted in the context of Lamarr. In particular,

  • if_exists defaults to "append"
  • index defaults to False

Definition at line 19 of file PandasLoader.py.

Constructor & Destructor Documentation

◆ __init__()

PyLamarr.loaders.PandasLoader.PandasLoader.__init__ (   self,
**  to_sql_kwargs 
)

Definition at line 37 of file PandasLoader.py.

Member Function Documentation

◆ __call__()

PyLamarr.loaders.PandasLoader.PandasLoader.__call__ (   self,
  database 
)

Definition at line 46 of file PandasLoader.py.

◆ load()

PyLamarr.loaders.PandasLoader.PandasLoader.load (   self,
**  dataframe_dict 
)

Internal.

Definition at line 50 of file PandasLoader.py.

Member Data Documentation

◆ _db

PyLamarr.loaders.PandasLoader.PandasLoader._db
protected

Definition at line 40 of file PandasLoader.py.

◆ _kwargs

PyLamarr.loaders.PandasLoader.PandasLoader._kwargs
protected

Override of the default values.

Definition at line 43 of file PandasLoader.py.


The documentation for this class was generated from the following file: