From 33508771c234750cc4c1cb916e8263cff76c6688 Mon Sep 17 00:00:00 2001 From: Aline Menin Date: Mon, 2 May 2022 11:55:59 +0200 Subject: [PATCH] ignore output data --- .gitignore | 4 ++-- csv_to_json.py | 20 -------------------- rules.json | 1 - 3 files changed, 2 insertions(+), 23 deletions(-) delete mode 100644 csv_to_json.py delete mode 100644 rules.json diff --git a/.gitignore b/.gitignore index 4e9cf9f..5b67053 100644 --- a/.gitignore +++ b/.gitignore @@ -128,5 +128,5 @@ dmypy.json # Pyre type checker .pyre/ -# input data -data/input_data_*.csv \ No newline at end of file +# output data +data/** \ No newline at end of file diff --git a/csv_to_json.py b/csv_to_json.py deleted file mode 100644 index 825dba6..0000000 --- a/csv_to_json.py +++ /dev/null @@ -1,20 +0,0 @@ - -import argparse, sys -import pandas as pd - -parser = argparse.ArgumentParser() - -parser.add_argument('--datafile', help='Path to csv file') - -args = parser.parse_args() - -rules_df = pd.read_csv(args.datafile, sep=';') -print(rules_df) -rules_df['antecedents'] = [list(eval(x)) for x in rules_df['antecedents']] -rules_df['consequents'] = [list(eval(x)) for x in rules_df['consequents']] -rules_df['source'] = [list(eval(x)) for x in rules_df['source']] -rules_df['target'] = [list(eval(x)) for x in rules_df['target']] -print(rules_df) - -filename = args.datafile.replace('.csv', '') + '.json' -rules_df.to_json(path_or_buf=filename, orient='records') \ No newline at end of file diff --git a/rules.json b/rules.json deleted file mode 100644 index a793359..0000000 --- a/rules.json +++ /dev/null @@ -1 +0,0 @@ -[{"antecedents":["named entity 'tetraploid'"],"consequents":["named entity 'diploid'"],"confidence":1.0,"interestingness":0.3333331536,"support":0.0019428254,"isSymmetric":true},{"antecedents":["named entity 'diploid'"],"consequents":["named entity 'tetraploid'"],"confidence":0.3333333333,"interestingness":0.3333331536,"support":0.0019428254,"isSymmetric":true}] \ No newline at end of file