X-Git-Url: https://code.communitydata.science/cdsc_reddit.git/blobdiff_plain/36b24ee933b95424686cfeaa2b2bd9776f23f853..7df8436067dba9a9e6867424002d01593e4bcd25:/similarities/tfidf.py diff --git a/similarities/tfidf.py b/similarities/tfidf.py index 30033a8..002e89f 100644 --- a/similarities/tfidf.py +++ b/similarities/tfidf.py @@ -15,10 +15,9 @@ def _tfidf_wrapper(func, inpath, outpath, topN, term_colname, exclude, included_ else: include_subs = select_topN_subreddits(topN) - df = func(df, include_subs, term_colname) - - df.write.parquet(outpath,mode='overwrite',compression='snappy') + dfwriter = func(df, include_subs, term_colname) + dfwriter.parquet(outpath,mode='overwrite',compression='snappy') spark.stop() def tfidf(inpath, outpath, topN, term_colname, exclude, included_subreddits):