use Path to make directories not os.
This commit is contained in:
parent
39c0fa7a29
commit
1cca01fb69
@ -133,11 +133,8 @@ def weekly_tf(partition,
|
|||||||
nullable_schema = True
|
nullable_schema = True
|
||||||
|
|
||||||
dataset = ds.dataset(f"{input_parquet}/{partition}", format='parquet')
|
dataset = ds.dataset(f"{input_parquet}/{partition}", format='parquet')
|
||||||
if not os.path.exists(output_10p_sample_path):
|
Path(output_10p_sample_path).mkdir(parents=True, exist_ok=True)
|
||||||
os.mkdir(output_10p_sample_path)
|
Path(temp_output_tfidf_path).mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
if not os.path.exists(temp_output_tfidf_path):
|
|
||||||
os.mkdir(temp_output_tfidf_path)
|
|
||||||
|
|
||||||
ngram_output = partition.replace("parquet","txt")
|
ngram_output = partition.replace("parquet","txt")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user