Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

I have a dataframe with a json substring in 1 of the columns. i want to extract variables and make columns for them

with open('your_json_file.json') as f:
    data = json.load(f)

df = pd.json_normalize(data)
df.columns = ['id', 'name', 'logo', 'ico_score', 'url', 'raised']
print(df)

    id        name  logo ico_score   url    raised
0  126        SONM  link       6.7  link  42000000
1  132     openANX  link       5.7  link  18756937
2  166  Boulu00e9  link       5.6  link
 
PREVIOUS NEXT
Tagged: #I #dataframe #json #substring #extract #variables #columns
ADD COMMENT
Topic
Name
8+7 =