Git Product home page Git Product logo

secondtask's Introduction

SecondTask

Полностью решена поставленная задача. Заданы примеры датафреймов. Одному продукту может соответствовать несколько категорий и одной категории может соответствовать несколько продуктов.


Пример работы программы:
categories_df:
+----------+------------+---------+
|CategoryID|CategoryName|ProductID|
+----------+------------+---------+
| 1| Big| 1|
| 9| Short| 1|
| 4| Fast| 1|
| 2| Cheap| 2|
| 3| Small| 2|
| 10| New| 2|
| 3| Small| 3|
| 4| Fast| 4|
| 5| Slow| 5|
| 6| Fast| 6|
| 7| Expensive| 7|
| 8| Long| 8|
| 2| Cheap| 8|
| 10| New| 9|
+----------+------------+---------+

products_df:
+---------+-----------+
|ProductID|ProductName|
+---------+-----------+
| 1| Car|
| 2| Phone|
| 3| House|
| 4| PC|
| 5| Laptop|
| 6| Tablet|
| 7| Grain|
| 8| Concrete|
| 9| Software|
| 10| Hardware|
| 11| Trucks|
+---------+-----------+


result_df:
+-----------+------------+
|ProductName|CategoryName|
+-----------+------------+
| Car| Fast|
| Car| Short|
| Car| Big|
| Phone| New|
| Phone| Small|
| Phone| Cheap|
| House| Small|
| PC| Fast|
| Laptop| Slow|
| Tablet| Fast|
| Grain| Expensive|
| Concrete| Cheap|
| Concrete| Long|
| Software| New|
| Hardware| NULL|
| Trucks| NULL|
+-----------+------------+


продукты, у которых нет категорий имеют NULL в столбце CategoryName.

secondtask's People

Contributors

rugewit avatar

Watchers

 avatar

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.