You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
352 B
15 lines
352 B
4 years ago
|
import pandas as pd
|
||
|
|
||
|
|
||
|
class DataBucket:
|
||
|
|
||
|
def __init__(self):
|
||
|
self.data = pd.DataFrame([], columns=['timestamp', 'value'])
|
||
|
|
||
|
def receive_data(self, data: pd.DataFrame):
|
||
|
self.data = self.data.append(data, ignore_index=True)
|
||
|
|
||
|
def drop_data(self, count: int):
|
||
|
if count > 0:
|
||
|
self.data = self.data.iloc[count:]
|