I have a real-time url "linktoAPI" containing a list of nested dictionary. I have tried many solutions from the links below, but none of them helps me achieve what I want. Apparently, it is because the value of the nested dictionary (key: "history_value") is ununiform and contain long string object.
Extract dictionary value from column in data frame (got the error: 'get' does not applicable for string)
How to convert list of nested dictionary to pandas DataFrame? (got the error:'str' object is not a mapping)
Split / Explode a column of dictionaries into separate columns with pandas,
https://www.skytowner.com/explore/splitting_dictionary_into_separate_columns_in_pandas_dataframe
from urllib.request import urlopen
import pandas as pd
import json
url = "LINKTOAPI"
response = urlopen(url)
data_json = json.loads(response.read())
baoluu = pd.DataFrame(data_json)
display(baoluu.head())
Run this code and you can see that the column "history_value" contain an ununiform dictionary. I want this columns to be separated into "ngaybaoluu", "ngayhoclai" and "lydo". Please help me. Thank you very much!!!