Parse the grouped data using StringGrouper to json

  data-science, dataframe, group-by, python, string

I’m using StringGrouper to group the similar data together and I want to see the group data in json file how can I parse the data into json file
here is my code:

import pandas as pd
from string_grouper import match_strings, match_most_similar, 
group_similar_strings, compute_pairwise_similarities, 
StringGrouper

string_grouper = StringGrouper(data['name'],ignore_index=True,min_similarity=0.83)

string_grouper = string_grouper.fit()

data['deduplicated_name'] = string_grouper.get_groups()

Source: Python Questions

LEAVE A COMMENT