Skip to content

Commit c0b259a

Browse files
authored
Update table_conversion.py
revert to related_pages from topics
1 parent 1450f93 commit c0b259a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/table_conversion.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
# --------- Converting the table ---------
1919

2020
print(f"----> Converting google table to {output_path} started.")
21-
resource_table = pd.read_csv(url, dtype={'name': str, 'url': str, 'description': str, 'topics': str, 'type': str, 'provider': str})
21+
resource_table = pd.read_csv(url, dtype={'name': str, 'url': str, 'description': str, 'related_pages': str, 'type': str, 'provider': str})
2222
resource_list = resource_table.to_dict("records")
2323
clean_resource_list = []
2424
for resource in resource_list:
25-
if not pd.isna(resource['topics']):
26-
category_list = resource['topics'].rsplit(sep=", ")
25+
if not pd.isna(resource['related_pages']):
26+
category_list = resource['related_pages'].rsplit(sep=", ")
2727
else:
2828
category_list = ""
2929
# registry_dict = {}
@@ -35,7 +35,7 @@
3535
clean_resource_list.append(clean_resource)
3636
# clean_resource['registry'] = registry_dict
3737
if category_list != "":
38-
clean_resource['topics'] = category_list
38+
clean_resource['related_pages'] = category_list
3939

4040
print(os.getcwd())
4141
with open(output_path, 'w+') as yaml_file:

0 commit comments

Comments
 (0)