Skip to main content

Questions tagged [flatten]

Flattening refers to either reducing a multi-dimensional array to a single dimension or to reducing a class and class methods to handle based function calls.

0 votes
0 answers
15 views

Unexpected coordinate switching when reshaping object positions into 3D grid after flattening and integrating

I am working on processing and analyzing velocity field data from VTI files using Python. The workflow includes reading VTI files, extracting velocity data, computing object trajectories, generating ...
Toto's user avatar
  • 11
0 votes
0 answers
22 views

Snowflake flatten JSON column in table

I have a column in a table that I need to flatten. Below is the JSON [ { "Name": "InputData", "Value": "{ \"EventType\" : \"Threshold\",...
Debbie Dippenaar's user avatar
0 votes
1 answer
43 views

Left join later flatten works not like left join, but the same as inner join

With this data: create or replace table test_json as select parse_json('{ "include": [ "x", "y", "z" ...
archjkeee's user avatar
0 votes
1 answer
39 views

How to use query and flatten formula in google sheets with null & desc

I'm trying to get column A by order of 'desc' based off whether column B is empty. I would like all of column A cells that have empty column B cells to be at the bottom. If possible without any helper ...
Nia's user avatar
  • 3
2 votes
2 answers
35 views

Matrix indexing/flattening

I am given a matrix with dimensions dim = nxmx4. I would like to flatten this matrix to a new 1-dimensional matrix with length l = n*m*4 using 3 nested for-loops. for (let x = 0; x < n; x++) { ...
Ecanyte's user avatar
  • 81
0 votes
1 answer
75 views

flatten JSON with Spark SQL

Im trying to explode the JSON structure using the Spark SQL in databricks. I have the below code. having trouble to explode the "operationalOrders" which normally is the "ArrayType"...
play_something_good's user avatar
2 votes
2 answers
75 views

Julia: Flattening array of `String`s

This is essentially the same question as Julia: Flattening array of array/tuples but for array of Strings. The Iterators.flatten(xs) solution shown in the above thread is excellent for numbers. But, ...
Ryo's user avatar
  • 374
0 votes
1 answer
51 views

Jolt to transform a multilayered Nested JSON to flat JSON

Input { "CustomerMaster": { "Rootnode": { "KUNNR": "0000000199", "NAME1": "COOP Sverige AB", "LAND1": &...
Jason Moore's user avatar
1 vote
1 answer
60 views

Why the speed difference in the iteration over a C# jagged array?

I have the following test code using a measurement of the execution speeds: using System.Diagnostics; namespace Jagged_array_test { internal class Program { static void Main(string[] args)...
Ladislav's user avatar
  • 299
2 votes
1 answer
50 views

Normalizing Nested (hierarchical) Json in pyhton

I am extracting an API where the json response I get is as follows { "prod": "Food", "id": "F1", "item": [ { "prod": &...
user11593389's user avatar
0 votes
2 answers
115 views

Using scipy.optimize library to find minimum of a function

initially I write this code through many iterations and it works fine. import numpy as np from scipy.optimize import minimize # Define the sigmoid function def sigmoid(x): return 1 / (1 + np.exp(...
Aden Denitz's user avatar
0 votes
3 answers
53 views

Converting Rows of data into a single column, including IMAGES

I have found many solutions that pull rows of data into a single column of data, but I cannot figure out a solution that will also return images as part of the data. Sample data is here: https://docs....
user1132149's user avatar
0 votes
1 answer
31 views

How to flatten a nested json

I want to flatten a nested input JSON. The JSON contains a product with "n" product attributes. Attached to the product are "n" items, each of this item can have "n" ...
Katja Bürger's user avatar
0 votes
1 answer
56 views

Can/should a single table subquery be flattened

I was going through my course material for the SQL class that I am taking and it mentioned that in order to make programs run faster and run in one pass using joins verses a subquery. It stated that ...
ImpossibleInc's user avatar
0 votes
2 answers
32 views

Google Sheets: Repeat "Product SKUs" for 5 rows per SKU in another Sheet

Basically I need to get SKUs in one sheet formatted like this: Column A SKU 1 SKU 2 SKU 3 To become formatted like this in another sheet: Column A SKU 1 SKU 1 SKU 1 SKU 1 SKU 1 SKU 2 SKU ...
Robert Shih's user avatar

15 30 50 per page
1
2 3 4 5
107