1
0

use Path to make directories not os.

This commit is contained in:
Nathan TeBlunthuis 2024-12-04 07:47:47 -08:00
parent 39c0fa7a29
commit 1cca01fb69

View File

@ -133,11 +133,8 @@ def weekly_tf(partition,
nullable_schema = True
dataset = ds.dataset(f"{input_parquet}/{partition}", format='parquet')
if not os.path.exists(output_10p_sample_path):
os.mkdir(output_10p_sample_path)
if not os.path.exists(temp_output_tfidf_path):
os.mkdir(temp_output_tfidf_path)
Path(output_10p_sample_path).mkdir(parents=True, exist_ok=True)
Path(temp_output_tfidf_path).mkdir(parents=True, exist_ok=True)
ngram_output = partition.replace("parquet","txt")