Question: In jupyter, Python 3: #Q1: We want to represent the students registered in BUSA 523 using a dataframe. # The students registers in the course
In jupyter, Python 3:
#Q1: We want to represent the students registered in BUSA 523 using a dataframe. # The students registers in the course are as following. # Name Age Major GPA # Joe 25 MKT 3.25 # Jack 22 ACT 3.82 # Marry 23 MGT 3.62
# the name of the dataframe is Students. Now, using pandas dataframe we want # to create such a dataframe. import '?' as pd students = pd.DataFrame (data = {'Name':['Joe','Jack','Marry'], 'Age':['?','?','?'], '?': ['MKT','ACT','MGT'], '?' : ['?',3.85,'?']}, '?' = ['Name', 'Age','Major','GPA']) print(students) # The dean also wants to record the city that students are coming from. # a new column needs to be added to the current dataframe. the name of # the column is City. Joe is coming from Commerce, Jack and Marry both are # from Dallas. The following command adds the colum to the dataframe. students'?'= '?'(['Commerce','Dallas','Dallas']) print(students)
# Marry has informed that her GPA is incorrect and the true value is 3.75. # we want to change her GPA to 3.75 using the following comment. students.'?'['?','?'] = 3.75 print(students)
# Joe suddently dropped out from school and we do not to keep his record. # the following command deletes Joe's record. students.'?' print(students)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
