1. Homepage
  2. Programming
  3. IE5600 Applied Programming for Industrial Systems - Individual Assignment 1 - PyPivot

IE5600 Applied Programming for Industrial Systems - Individual Assignment 1 - PyPivot

Engage in a Conversation
NUSIE5600Applied Programming for Industrial SystemsPyPivotPython

IE5600 – Applied Programming for Industrial Systems CourseNana.COM

IE5600 – Applied Programming for Industrial Systems CourseNana.COM

AY 2023/24 Semester 1 Individual Assignment 1 - PyPivot CourseNana.COM

Objectives CourseNana.COM

At the completion of the individual assignment, you should: CourseNana.COM

  1. Develop a better understanding of how to apply the computational problem solving process to a moderately complex problem. CourseNana.COM

  2. Implement imperative and structured programming paradigms in Python. CourseNana.COM

  3. Apply appropriate control flow statements to implement algorithm. CourseNana.COM

  4. Apply appropriate multi-dimensional data structures to implement algorithm. CourseNana.COM

General Requirements CourseNana.COM

You are required to develop a Python program known as PyPivot to manage data in a two- dimensional dataset consisting of column header representing attribute name and row header representing record identifier. The program should then allow user to visualise the data in a pivot table. A pivot table is a table of grouped values that aggregates the individual data items in the original dataset within one or more discrete categories. Typical aggregate functions include count, sum, average, minimum and maximum. CourseNana.COM

Figure 1 shows a typical pivot table in Microsoft Excel. As shown in Figure 1, categorical attributes may be placed in a pivot table as columns, rows or a mixture of both. If there are more than one aggregated data items, they can be placed in the pivot table column-wise or row-wise as shown in Figure 2. CourseNana.COM

Figure 2 – Pivot table showing two aggregated data items column-wise (top) and row-wise (bottom). Use Cases CourseNana.COM

Implement the following use cases for PyPivot without the use of any Python modules. In other words, your program should NOT contain any import statement unless you are importing your own user-defined module(s). CourseNana.COM

Use Case CourseNana.COM

Use Case Description/Business Rules CourseNana.COM

New Dataset (0 mark) CourseNana.COM

  • Initialise PyPivot with a new empty dataset containing zero column and zero row. CourseNana.COM

  • If there is an existing dataset (at least one column and/or one row, prompt user to confirm the reinitialisation. CourseNana.COM

2 Load Test Dataset CourseNana.COM

Auto load the dataset shown in Figure 1.
This dataset can be downloaded from Canvas.
CourseNana.COM

Add Column (1 mark) CourseNana.COM

Use Case CourseNana.COM

Use Case Description/Business Rules CourseNana.COM

Delete Column (1 mark) CourseNana.COM

  • Delete an existing column in the dataset using its attribute name. CourseNana.COM

  • If the dataset contains at least one row, all existing data for the affected column should be deleted. CourseNana.COM

    Sample Input: CourseNana.COM

Delete Gender CourseNana.COM

Add Row (1 mark) CourseNana.COM

Delete Row (1 mark) CourseNana.COM

  • Delete an existing row in the dataset using its row identifier, i.e., the one-based index number. CourseNana.COM

  • If the row does not exist, print out an error message. CourseNana.COM

    Sample Input: CourseNana.COM

Delete 1 CourseNana.COM

Use Case CourseNana.COM

Use Case Description/Business Rules CourseNana.COM

View Pivot Table Fields (1 mark) CourseNana.COM

  • View the list of current pivot table field(s) added by the user. CourseNana.COM

  • By default, a new dataset does not have any pivot table field. CourseNana.COM

  • There are three types of pivot table field that can be added by user: CourseNana.COM

    o Columns – Categorical attributes designated as the column header. CourseNana.COM

o Rows – Categorical attributes designated as the row header. CourseNana.COM

o Values – Data attributes that are aggregated from the original data values. The following aggregation functions should be supported: CourseNana.COM

Count CourseNana.COM

Add Pivot Table Field (1 mark) CourseNana.COM

  • Add a pivot table field by prompting user to input attribute name and field type. For value field, prompt user to select the required aggregation function. CourseNana.COM

  • If there are more than one value fields, prompt user to select column-wise or row-wise display. CourseNana.COM

  • If the attribute has already been added as a pivot table field, print out an error message. CourseNana.COM

    Sample Input: Gender CourseNana.COM

    Row CourseNana.COM

Delete Pivot Table Field (1 mark) CourseNana.COM

  • Delete an existing pivot table field by prompting user to input attribute name. CourseNana.COM

  • If the attribute has not been added as a pivot table field, print out an error message. CourseNana.COM

Use Case CourseNana.COM

Use Case Description/Business Rules CourseNana.COM

View Pivot Table (2 marks) CourseNana.COM

  • Generate the pivot table according to the current dataset and based on the current pivot table fields definition. CourseNana.COM

  • That is, each time the user views the pivot table, it should be refreshed according to the latest data and fields. CourseNana.COM

  • The program should be able to handle all scenarios including one or more column fields and row fields as well as one or more value fields of different aggregation. CourseNana.COM

  • If a value field cannot be calculated for a particular cell, the cell should be shown as a blank cell. CourseNana.COM

    See Figure A.2 in Appendix. CourseNana.COM

View Pivot Table with Grouped Summary
(1 mark)
CourseNana.COM

Use Case 10 with the generation of row summary, column summary and overall summary for each value field. CourseNana.COM

See Figure A.2 in Appendix:
In this pivot table, the value field is sum of salary. Accordingly, the pivot table should show the total CourseNana.COM

sum of salary for the row field(s), column field(s) and grand total. CourseNana.COM

Deliverable Submission CourseNana.COM

The assignment deliverable to be submitted to the Canvas Assignments tool are to be placed in a single zip archive file with the following folders structure: CourseNana.COM

source subfolder containing:
o All Python source files that constitute your program.
o The main source file containing the program entry point should be named as CourseNana.COM

pypivot.py, i.e., your program should be runnable with the command python pypivot.py CourseNana.COM

Upload this zip archive file to the designated Canvas Assignment: Assignments > Individual Assignment 1. CourseNana.COM

Your deliverables must be submitted latest by Sunday, 22 October 2023, 11:59 pm. No submission will be accepted for assessment after this date/time and you will be awarded 0 marks. CourseNana.COM

-- End of Assignment Specification -- CourseNana.COM

Get in Touch with Our Experts

WeChat (微信) WeChat (微信)
Whatsapp WhatsApp
NUS代写,IE5600代写,Applied Programming for Industrial Systems代写,PyPivot代写,Python代写,NUS代编,IE5600代编,Applied Programming for Industrial Systems代编,PyPivot代编,Python代编,NUS代考,IE5600代考,Applied Programming for Industrial Systems代考,PyPivot代考,Python代考,NUShelp,IE5600help,Applied Programming for Industrial Systemshelp,PyPivothelp,Pythonhelp,NUS作业代写,IE5600作业代写,Applied Programming for Industrial Systems作业代写,PyPivot作业代写,Python作业代写,NUS编程代写,IE5600编程代写,Applied Programming for Industrial Systems编程代写,PyPivot编程代写,Python编程代写,NUSprogramming help,IE5600programming help,Applied Programming for Industrial Systemsprogramming help,PyPivotprogramming help,Pythonprogramming help,NUSassignment help,IE5600assignment help,Applied Programming for Industrial Systemsassignment help,PyPivotassignment help,Pythonassignment help,NUSsolution,IE5600solution,Applied Programming for Industrial Systemssolution,PyPivotsolution,Pythonsolution,