def get_data_from(self, dir):
    files = glob.glob(f'{dir}/*')
    if (files == []):
        raise f'directory {dir} does not contain any .csv file'
    data = None
    for file in files:
        if (file == f'{dir}/merged_data.csv'):
            continue
        if (data is None):
            data = pd.read_csv(file)
            continue
        temp_data = pd.read_csv(file)
        temp_data = temp_data.dropna(axis=1)
        data = data.append(temp_data)
    data.drop_duplicates()
    data = data.sort_values('Date', ascending=False, key=self.date_to_int)
    data = data[:408]
    data.to_csv(f'{dir}/merged_data.csv', index=False)
    return data
def get_data_from(self, dir):
    files = glob.glob(f'{dir}/*')
    if (files == []):
        raise f'directory {dir} does not contain any .csv file'
    data = None
    for file in files:
        if (file == f'{dir}/merged_data.csv'):
            continue
        if (data is None):
            data = pd.read_csv(file)
            continue
        temp_data = pd.read_csv(file)
        temp_data = temp_data.dropna(axis=1)
        data = data.append(temp_data)
    data.drop_duplicates()
    data = data.sort_values('Date', ascending=False, key=self.date_to_int)
    data = data[:408]
    data.to_csv(f'{dir}/merged_data.csv', index=False)
    return data