Beispiel #1
0
def pickle_data(data, name):
    if isinstance(data, pd.DataFrame):
        data.to_pickle('{0}/{1}'.format(get_path(), name))

    else:
        with open('{0}/{1}'.format(get_path(), name), 'wb') as f:
            pickle.dump(data, f)
Beispiel #2
0
def load_file(file_name):
    path = get_path()
    return pd.read_pickle('{0}/{1}'.format(path, file_name))