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)
def load_file(file_name): path = get_path() return pd.read_pickle('{0}/{1}'.format(path, file_name))