237 questions
0
votes
1
answer
43
views
How to Create a Pandas Dataframe from JSON Nested Objects
I'm trying to create a Pandas DataFrame from a JSON file that looks like this:
{
"GameID": "1,218,463,841",
"Date - Start": "1761097369",
"Date - End&...
1
vote
0
answers
38
views
Attempting to flatten a list of dictionaries to a Dataframe but can't get to the lowest level information with json-normalise [duplicate]
Below is the output of an API call - it is a dictionary which contains a list of dictionaries I'm interested in under 'response'
I filter fixture_ids for 'response' because the rest is not useful ...
-3
votes
2
answers
168
views
Using json_normalize with pandas
I'm using the following code in python to flatten the json structure below, however it doesn't work for all levels. I'm interested in the tags.tags column data specifically shown on the picture below
...
1
vote
1
answer
106
views
pandas retaining column after flattening json
I have a pandas dataframe where each row corresponds to a news article, and each cell in the row contains one dictionary that contains stock ticker information as well as some metrics. The dataframe ...
1
vote
1
answer
230
views
Flatten list of dict (array) as new columns not working with json normalize
Apologies as I'm quite inexperienced with Python and looking for assistance here 🙏
I am trying to flatten a list of dicts into new columns in an existing dataframe, with using key as column names and ...
0
votes
1
answer
155
views
Unable to explode the nested list within a json using pd.json_normalize
I tried different ways to get this done, but unable to do so. Please help here.
I am trying to explode a nested json list using python pd.json_normalize. After exploding the output is coming in two ...
0
votes
1
answer
122
views
Flattening of json file
I am having problems while converting the json file to the dataframe. The json file structure is like this:
"results": [
{
"submissions": [
{
"...
0
votes
1
answer
136
views
How to Normalize JSON data into a pandas dataframe with json_normalize
I'm trying to transform this complex object into a pandas dataframe
data={
"customers": [
{
"a": 'true',
"addresses": [{"city&...
0
votes
1
answer
115
views
Json normalize meta issue [duplicate]
I am trying to convert a nested JSON to a dataframe. The JSON file is deeply nested and I am used the meta parameter to specify the nested structure so that all the JSON attributes can be stored as ...
1
vote
2
answers
74
views
Create normalized dataframe from a nested json
I am trying to create a dataframe from nested json file but running into trouble.
[
{
"rec_id": "1",
"user": {
"id": "12414&...
0
votes
1
answer
71
views
What is the right way to read csv with dictionary in one column in Python?
I have a CSV file named test.csv with the following data:
,ts,snapshot
0,1686321823605,"{'asks': [['26566.1', '1.451456']], 'bids': [['26566', '4.17579913']]}"
1,1686321823705,"{'asks': ...
0
votes
1
answer
104
views
Pandas's JSON_normalize for the nested dictionary
I have the following nested dictionary that contains the information that a person
publicly reported to the organization.
`person_json={'basicInformation': {'individualId': 5429958,
'firstName': '...
0
votes
1
answer
38
views
How json normalize parses the below ISO Dates?
How json_normalize from pandas parses the ISODates that include timezone hours?
i.e.
"startDate" : ISODate("2021-02-01T22:37:37.000+02:00"),
"entryDate" : ISODate(...
10
votes
2
answers
27k
views
ImportError: cannot import name 'json_normalize' from 'pandas.io.json'
python 3.9.2-3
pandas 2.0.0
pandas-io 0.0.1
Error:
from pandas.io.json import json_normalize
ImportError: cannot import name 'json_normalize' from 'pandas.io.json' (/home/casaos/.local/lib/...
2
votes
1
answer
378
views
JSON Normalize with Value as Column
I have the following JSON;
{
"data": [
{
"gid": "1203715497540179",
"completed": false,
"custom_fields": [
{
...
0
votes
1
answer
86
views
Normalize a nested json file in Python
Suppose a list of objects: one, two, three,...
Every object is composed of name, foo1, and foo2 fields.
[{
'name':'one',
'foo2':{
'id':'1.1',
'id':'1.2'
},
'foo1':[
...
1
vote
2
answers
2k
views
How to use pd.json_normalize to retrieve the data I need
I have this JSON list in Python:
[{'id': 'TC2-FFA',
'shortCode': 'TC2-FFA',
'dataSet': {'datumPrecision': 2,
'id': 'TC2_37',
'shortCode': 'TC2_37',
'shortDescription': 'Clean Continent to ...
0
votes
1
answer
282
views
How to split a column with json string into their own columns
I have a dataframe like (with one example row):
raw_data = [{'id': 1, 'name': 'FRANK', 'attributes': '{"deleted": false, "rejected": true, "handled": true, "order&...
0
votes
2
answers
64
views
Pandas | JSON Normalize | Deeply Nested Sections
I have a data structure which is a very complex/nested JSON.
After reading other solutions on SO, I am comfortable with the fact that I may need to make multiple DFs and merge them together (e.g ...
0
votes
1
answer
348
views
Why I'm getting KeyError when the column exists?
Using json_normalize I created a dataframe, the data I parsed includes a list of dictionaries, hence I used the parameters "record_path" and "meta".
The issue is that I get a ...
-1
votes
2
answers
633
views
How to get metadata when reading nested json with pandas
I'm trying to get the metadata out from a json using pandas json_normalize, but it does not work as expected.
I have a json fine with the following structure
data=[
{'a':'aa',
'b':{'b1':'bb1','...
0
votes
1
answer
62
views
Python: parce json with 2 arrays via json_normalize
Would you help, please, to parce 2-arrayed json via python, json_normalize.
Here is the code:
import json
from pandas.io.json import json_normalize
data5 = {
"id": "0001",
&...
0
votes
2
answers
790
views
convert a nested json response from API to a pandas dataframe using normalize
I've been trying to convert a json response from an api to a full panadas dataframe. I tried json normalize to achieve it unfortunately i was able to split it only to one level.
response = {
"...
1
vote
2
answers
608
views
Creating a pandas DataFrame from json object and appending a column to it
From an API, I get information about who has filled a particular form and when they have done it as a json object. I get the below data from 2 forms formid = ["61438732", "48247759dc&...
1
vote
1
answer
70
views
Extract data from Json into Pandas (Python)
I'm trying to extract data in a dataframe. My attempts with pd.json_normalize did not work... I must be doing something wrong.
Exemple :
{
"data": [
{
"date"...