def __init__(self, filename='result', features=[]):
    assert isinstance(filename, str), 'Expected name to be str, got {}'.format(filename)
    self.filename = filename
    self.features = features
    self.content = {}
    if ((self.filename + '.csv') in os.listdir()):
        self.csv = pd.read_csv((self.filename + '.csv'), index_col=0)
    else:
        self.csv = {}
        self.reset()
        self.csv = pd.DataFrame(self.csv)
        self.csv.to_csv((self.filename + '.csv'), mode='w')
        print('csv saved as {}.csv'.format(self.filename))
def __init__(self, filename='result', features=[]):
    assert isinstance(filename, str), 'Expected name to be str, got {}'.format(filename)
    self.filename = filename
    self.features = features
    self.content = {}
    if ((self.filename + '.csv') in os.listdir()):
        self.csv = pd.read_csv((self.filename + '.csv'), index_col=0)
    else:
        self.csv = {}
        self.reset()
        self.csv = pd.DataFrame(self.csv)
        self.csv.to_csv((self.filename + '.csv'), mode='w')
        print('csv saved as {}.csv'.format(self.filename))