All Questions
Tagged with data-wrangling json
13 questions
0
votes
1
answer
47
views
JQ question about parsing dictionaries within lists
I have a json file in the following format
{
"a": [
[
{
"p": "p1-value",
"d": "d1-value"
},
{
"p&...
0
votes
2
answers
103
views
R - Dataframes to output; Nested JSON
I'm trying to grasp data from datatables and - after some wrangling - get them to a JSON output format, so I can send the updates into the API.
I made a simplified example with a Quotation and several ...
4
votes
2
answers
4k
views
How to split JSON row data into multiple columns in Python
I'm trying to find a way to split (flatten) JSON row data into multiple columns in pandas.
I have a dataframe which looks like the following:
Current Dataframe
This is an example of what a row looks ...
2
votes
2
answers
442
views
How to convert column names and the different values under it into key value pairs in R?
I have a data.frame in R which is in long format.
Gender
Area
Value
Year
Column X
Column Y
And other columns...
male
urban
31.45
2012
xxx
yyy
zzz
male
rural
41
2012
xxx
yyy
zzz
male
rural
35.6
...
1
vote
1
answer
76
views
How to create a dataframe with data from JSON output
I've used a web API to import data from a specific website. I was able to import the data in JSON format. I am very new to python, hence finding hard to transform it to a tabular format which I can ...
2
votes
1
answer
169
views
Turn pandas nested JSON structure into a data frame
I have output that comes as a nested JSON. How can I take this nested JSON structure and change it to a data frame?
I think there are two main levels "Quotes" and "Carriers". I am ...
-2
votes
1
answer
28
views
Populate array of objects in Javascript using two different values as range [closed]
Having a an array of objects with the following structure:
[{value: "a", start: 1950, end: 1954, description: "aaa"},
{value: "b", start: 1953, end: 1956, description: &...
1
vote
2
answers
2k
views
Pivot/Transform json data columns to create new rows in javascript
I have a json file in the following format:
const data = [
{category: "A", country: "UK", name: "United Kingdom", country_id: "01", 2015: 5, 2016: 56, 2017: ...
2
votes
1
answer
46
views
Combine objects in a json using javascript
Having a JSON in this format:
[{
name: "A",
country: "X",
countryID: "02",
value: 15
},
{
name: "A",
country: "Y",
...
1
vote
2
answers
55
views
Wrangling network adjacency data in jq: dictionary to array
I have graph data in JSON and would like to massage it a bit so that:
{"1": [1, 2, 3, 4],
"2": [3, 4, 7]}
Becomes
[1, 1]
[1, 2]
[1, 3]
[1, 4]
[2, 3]
[2, 4]
[2, 7]
Is it possible ...
0
votes
3
answers
76
views
Javascript data wrangling: Calculate percent change in a nested json
Having a json file in this format...
data =[
{
key: "london",
values: [
{day: "2020-01-01", city: "london", value: 10},
{day: "2020-01-02", city: &...
1
vote
2
answers
54
views
Calculate some basic operations and transform a json array using javascript
Having a json array in this format:
[
{year: 2020, day: 1, city: "New York", value: 16}
{year: 2020, day: 2, city: "New York", value: 12}
{year: 2020, day: 3, city: "New York", value: 10}
{...
3
votes
2
answers
4k
views
how to parse a json column in a df where we append new column using selected keys [duplicate]
Hi I am beginner in python & R. I had a quick question:
#I have a data frame that looks like this:
# Import pandas library
import pandas as pd
# initialize list of lists
data = [['BarackObama', ...