GithubHelp home page GithubHelp logo

goz / data-engineer-interview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from avantfinco/data-engineer-interview

1.0 0.0 0.0 164 KB

Do you have what it takes to be an Avant data engineer?

data-engineer-interview's Introduction

Data Engineering Recombinator Challenge

If you stumbled on this challenge and enjoyed trying it, feel free to send a note over to [email protected] and talk directly to the director of data science. We're constantly chatting with awesome developers. Even if you're purely into open source... if you think playing with data is cool we think you're cool.

Context

Being able to easily manipulate data (aka munging) is an important part of our day-to-day here at Avant. Please write a small CLI tool that works as described below. You may use the language of your choice.

Input

Your program should expect valid JSON representing a two dimensional matrix. It will be in one of the following two formats:

A) a list of lists

The expected format is [ [variable names], [first row], [second row], ... ]

recombinator '[ ["a","b","c"], [1,2,null], [null,3,4], [5,null,6] ]'

B) a list of objects

JSON objects are simply unordered collections of key:value pairs.

Each row is represented by an object containing the variables set for that row.

Accordingly, this form of input is convenient for sparse data sets.

recombinator '[ { "a":1, "b":2 }, { "b":3, "c":4 }, { "c":6, "a":5 } ]'

Output

Your program should transform the input into a single JSON object mapping variable names to lists of values.

For input type (B), any variables that are missing in a row should be imputed with null.

The order of the values in each variable's list should be the same as the order of the rows.

'{ "a": [1,null,5], "b": [2,3,null], "c": [null,4,6] }'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.