0

I am making api call via python sdk to get facebook insights dat and I am getting the following response from API. I would like to remove from response json object. can you please guide me how to do this? I have tried to serialize it by .dumps() but it does not serialize.
[ { "account_id": "123" }, { "account_id": "123" }, { "account_id": "123" } ]

1 Answers1

0

I'm pretty sure you can just cast the insights list into a Pandas Dataframe like:

    insights_list = campaign.get_insights()
    insights_df = pd.Dataframe(insights_list)

In this way you can have your metrics in the dataframe columns and it will improve the readability.

Sprizgola
  • 416
  • 2
  • 10