Professional Documents
Culture Documents
Company ‘X’ is a rental ecommerce platform that rents products from different categories to people
for fixed durations. The excel sheet contains the company data related to various orders.
File 1 (“data_extension.xlsx”) – contains the orders placed by customers where each field is as
follows:
Order ID
Extension Of – Previous Order ID number (Problem 1 below provides more details)
Archive – Some kind of tag
Quantity – Number of products rented
City – city in which the order was placed
File 2 (“data_date.xlsx”) – contains the orders placed by customers where each field is as follows:
Order ID
Archive – Some kind of tag
Quantity – Number of products rented
Start Date – date at which the item was delivered to the customer
End Date – date at which item was returned by the customer
City – city in which the order was placed
Problem Statement:
Order ID Extension Of
SL384
SL10046 SL384
SL11995 SL10046
The new table which has the “Parent ID” column will look like -
SL384 SL384
Example: The below example illustrates how split dates are created when the Start Date is
“01/05/2017” and the End Date is “06/07/2017”
The new table with ‘split start date’ and ‘split end date’ will look like
Perform the above two tasks in a single script in R programming and share it as “<Name>_task.R” .
(Please make comments to the code) and share the output in .csv format.