dssg_banner
import json
import os
import pandas as pd

from features.textual_features.keyword_search.contextual_fuzzy_search import search_best_matches_dict

pd.set_option('display.max_colwidth', 1000)
pd.set_option('display.max_rows', None)

Write results to csv and json

# write to csv
all_matches.to_csv(os.path.join(OUTPUT_FILE_PATH + ".csv"), header=True, index=False)

# write to json
all_matches_json = all_matches.to_json(orient='records')
with open(OUTPUT_FILE_PATH + ".json", 'w') as outputfile:
    outputfile.write(all_matches_json)