From 25d5020aca08d902602d89521f8ae686ebc19a34 Mon Sep 17 00:00:00 2001 From: romainsacchi Date: Thu, 22 Feb 2024 12:14:34 +0000 Subject: [PATCH] Black reformating --- dev/convert_missings.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/dev/convert_missings.py b/dev/convert_missings.py index 34dd9ec..1781573 100644 --- a/dev/convert_missings.py +++ b/dev/convert_missings.py @@ -2,16 +2,20 @@ import yaml # Load the CSV file -file_path = 'missing_classifications.csv' +file_path = "missing_classifications.csv" data = pd.read_csv(file_path) # Convert dataframe to a list of tuples, matching the desired output structure -data_tuples = [{tuple(x): "Other transportation support activities"} for x in data.to_numpy()] +data_tuples = [ + {tuple(x): "Other transportation support activities"} for x in data.to_numpy() +] # Prepare the data in the specified YAML format with the custom tag -yaml_data = yaml.dump(data_tuples, default_flow_style=False, allow_unicode=True, sort_keys=False) +yaml_data = yaml.dump( + data_tuples, default_flow_style=False, allow_unicode=True, sort_keys=False +) # Save the YAML data to a file -yaml_file_path = 'converted_yaml.yaml' -with open(yaml_file_path, 'w') as file: - file.write(yaml_data) \ No newline at end of file +yaml_file_path = "converted_yaml.yaml" +with open(yaml_file_path, "w") as file: + file.write(yaml_data)