Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
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&...
ScaryAardvark's user avatar
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 ...
Schaep's user avatar
  • 21
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 ...
wm10's user avatar
  • 41
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 ...
Kaustav Dutta's user avatar
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 ...
adey27's user avatar
  • 469
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 ...
user4933's user avatar
  • 1,585
-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: &...
console.log's user avatar
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: ...
console.log's user avatar
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", ...
console.log's user avatar
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 ...
blue-dino's user avatar
  • 133
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: &...
console.log's user avatar
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} {...
console.log's user avatar
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', ...
WolfgangBagdanow's user avatar