def get_journal_features(cacheddatapath, rawdatapath):
try:
with gzip.open(os.path.join(cacheddatapath, "journal_features.pklz"), "rb") as infile:
journ_raw = pickle.load(infile)
except:
df = get_preprocessed_df(cacheddatapath, rawdatapath)
journ_raw = make_journal_features(df)
with gzip.open(os.path.join(cacheddatapath, "journal_features.pklz"), "wb") as outfile:
pickle.dump(journ_raw, outfile, protocol=4)
return journ_raw
评论列表
文章目录