solve this, Data Mining import pandas as pd import numpy as np data = { 'Student ID':
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
import pandas as pd import numpy as np data = { 'Student ID': [1, 2, 3, 4, 5], 'Name': ['Norah', 'Mohammed', 'Faisal', 'Ali', 'Lama'], 'Age' [19, 20, 'unknown', 'unknown', 21], 'Gender': ['Female', 'Male', 'Male', 'Male', 'Female'], 'Score': [85, 92, 78, 88, 'unknown'] } # ((((PRINT THE HEAD AFTER EACH STEP)))) #Task 1: Load the dataset into a Pandas DataFrame # Task 2: Drop Columns that Aren't Useful #Task 3: Handle Missing Values #replace unknown with NaN # Count missing values in each column and print the result missing_values = df.isnull().sum () print (missing_values) # Fill missing values in 'Age' and 'Score' with the mean (you can use the built in method mean () Task 4: Convert Categorical Values to Numeric for gender column #Task 5: Apply Feature Scaling/Normalization for age and score columns using MinMaxScaler (search about it) import pandas as pd import numpy as np data = { 'Student ID': [1, 2, 3, 4, 5], 'Name': ['Norah', 'Mohammed', 'Faisal', 'Ali', 'Lama'], 'Age' [19, 20, 'unknown', 'unknown', 21], 'Gender': ['Female', 'Male', 'Male', 'Male', 'Female'], 'Score': [85, 92, 78, 88, 'unknown'] } # ((((PRINT THE HEAD AFTER EACH STEP)))) #Task 1: Load the dataset into a Pandas DataFrame # Task 2: Drop Columns that Aren't Useful #Task 3: Handle Missing Values #replace unknown with NaN # Count missing values in each column and print the result missing_values = df.isnull().sum () print (missing_values) # Fill missing values in 'Age' and 'Score' with the mean (you can use the built in method mean () Task 4: Convert Categorical Values to Numeric for gender column #Task 5: Apply Feature Scaling/Normalization for age and score columns using MinMaxScaler (search about it)
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
CANMNMM January of this year. (a) Each item will be held in a record. Describe all the data structures that must refer to these records to implement the required functionality. Describe all the...
-
In its income statement for the year ended December 31, 2020, Bramble Company reported the following condensed data. Operating expenses $754,570 Interest revenue $28,440 Cost of goods sold 1,339,800...
-
Explain the rationale for the factors (functional integration, centralization of management, and economies of scale) used to determine whether two or more businesses form a unitary group under the...
-
Optic Vision Pty Ltd, a manufacturer of fibre-optic communications equipment, uses a job costing system. Since the production process is heavily automated, manufacturing overhead is applied on the...
-
Explain how candidate elimination uses version spaces to learn.
-
Rick and Debbie Siravo own a beachfront home in Wrightsville Beach, N.C. During the year, they rent it for 20 weeks (140 days) at $1,100 per week and use it 10 days for personal purposes. Rick...
-
Write a Diversity Policy for an Organisation of your choice. Include the following: Name of Organisation Business case brief statement as to why this organisation needs a Diversity Policy for...
-
Virginia Tech operates its own power generating plant. The electricity generated by this plant supplies power to the university and to local businesses and residences in the Blacksburg area. The...
-
What are the range of issues around controlling environmental pollution (land, air, water, biodiversity and waste) through private civil law (tort law) and criminal regulatory law? How can one answer...
-
A 2.04 kg toy train rolls around a circular horizontal track. If the train has an angular acceleration of -2.21 rads/s 2 and is released with an angular speed of 17.5 rpm, what time is required for...
-
K The Carbondale Hospital is considering the purchase of a new ambulance. The decision will rest partly on the anticipated mileage to be driven next year. The miles driven during the past 5 years are...
-
Instructions: conducting a negotiation between the two roles, On one side is an opera singer, and on the other side is an opera house (which hires singers), explain whats going on between both roles...
-
Queen Energy Inc. issued bonds on January 1, 2023, that pay interest semiannually on June 30 and December 31. The par value of the bonds is $290,000, the annual contract rate is 6%, and the bonds...
-
Mason Metal Creations is a medium size company located in Barrie, Ontario. The company specializes in designing and producing metal elements and home decor. The Metal Elements division can transfer...
-
Campus Bikes sells several brands of new bikes, including everything from high-end racing models to beach cruisers. In addition to sales of new bikes and accessories, Marks service department is...
-
A non-charmed baryon has strangeness S = 2 and electric charge Q = 0. What are the possible values of its isospin I and of its third component I z ? What is it usually called if I = 1/2?
-
Following are the data on percentage of investments in energy securities and tax efficiency from Exercise 14.16. Use α = 0.05. Presuming that the assumptions for regression inferences...
-
In the article Material Culture as Memory: Combs and Cremations in Early Medieval Britain (Early Medieval Europe, Vol. 12, Issue 2, pp. 89128), H. Williams discussed the frequency of cremation...
-
The Information Please Almanac provides data on the ages at inauguration and of death for the presidents of the United States. We give those data on the Weiss Stats CD for those presidents who are...
-
Evaluate the hypothesis that in societies in which female contributions to the food supply are less critical or less valued than male contributions, female status is lower.
-
Is private ownership of land a universal concept that applies to all societies? How much variation in ownership is found among forager groups?
-
How are forager religions different from your own? Are there any similarities?
Study smarter with the SolutionInn App