Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

My assignment is as follows: - Data Generation : Set random number seed ('123') Generate 2000 random 4-digit employee ids for (integer) Generate 12 rows

My assignment is as follows: -

Data Generation :

Set random number seed ('123') Generate 2000 random 4-digit employee ids for (integer) Generate 12 rows for each of the 2000 employees with each row corresponding to the last date of the month (31s-Jan-2019 to 31-Dec-2019). For each employee Randomly pick 1 salary (per month. ) from the list and assign the same per month to ALL 12 months as monthly salary. List of elements between 50,000 to 5,00,000 with an increment interval of 10,000 e.g. [10,000, 20,000, 30,000.............4,90,000, 5,00,000] After that, Randomly Pick 1 month out 12 months & % monthly hike number from below list for each of 2000 employees. Add additional monthly Hike from the selected month onwards for all the remaining months in a year for that employee. Monthly salary Hike [1, 2, 3] e.g. employee_id 1248 got a 1% hike per month in June, so 20,000 salaries would become 20,200 for the next 6 months. After that, Randomly Pick 1 month out 12 for each of 2000 employees and add an additional bonus percentage amount from the below list to that month's salary. [10, 15, 20, 25, 30] Mark eligible Bonus component 'Y' in that month. In End, Generate data frame which has for columns mentioned below (given ) Employee_id, Date, Salary, is_Bonus_in_month. 1243, 31-01-2019, 20,000, N 1243, 31-02-2019, 22,000, Y .... .... Total rows in the data frame are 2000 X 12 (1 row per month per employee)

Total columns 4.

I have performed coding till here

import random Employee_ID = [] random.seed(123) Employee_ID = random.sample(range(1000,9999), 2000) print (Employee_ID) please advice how to structure further?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

More Books

Students also viewed these Databases questions

Question

=+4. What is integrative therapy?

Answered: 1 week ago

Question

Organizing Your Speech Points

Answered: 1 week ago