I have the following variable
my_res = RecognizeEntitiesResult(id=0, entities=[
CategorizedEntity(text=50,000, category=Quantity, subcategory=Number, offset=10, length=6, confidence_score=0.8),
CategorizedEntity(text=infectious, category=Skill, subcategory=None, offset=29, length=10, confidence_score=0.8)],
warnings=[], statistics=None, is_error=False)
I want to have a Dataframe where each CategorizedEntity is a row, and the column for each row is the text, the category, and the confidence_score.
I tried the below, but with no success.
[x.as_dict() for x in my_res]
I could of course manually go through each CategorizedEntity and create a new row one by one but that doesnt seem very Pandas/Python-ic.
Any better way of doing this?