event_reader.csv_block_data_store
Documentation for eth_defi.event_reader.csv_block_data_store Python module.
CSV file backed block data storage like block headers.
Classes
Store block data as CSV file. |
Exceptions
Do not allow gaps in data. |
- exception NoGapsWritten
Bases:
ExceptionDo not allow gaps in data.
- __init__(*args, **kwargs)
- __new__(**kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- class CSVDatasetBlockDataStore
Bases:
eth_defi.event_reader.block_data_store.BlockDataStoreStore block data as CSV file.
- Parameters
path – Path to the CSV file
- __init__(path)
- Parameters
path (pathlib.Path) – Path to the CSV file
- load(since_block_number=0)
Load data from CSV file
- Parameters
since_block_number (int) – Ignored
- Return type
pandas.core.frame.DataFrame
- save(df, since_block_number=0, check_contains_all_blocks=True)
Save all data to CSV file.
- Parameters
since_block_number (int) – Ignored. Does not support incremental writing.
check_contains_all_blocks – Check that we have at least one data record for every block. Note that trades might not happen on every block.
df (pandas.core.frame.DataFrame) –
- save_incremental(df)
Write all partitions we are missing from the data.