Answered step by step
Verified Expert Solution
Question
1 Approved Answer
. In this task, you will write two new classes, namely series and Dataframe. The series class will be used to define either a row
.
In this task, you will write two new classes, namely series and Dataframe. The series class will be used to define either a row or column of data. The Dataframe class will keep a sequence of series objects. Series self, data, name") should initialize the series with the provided sequence of data, where name is the name of this series. You can think of the name as the name of a row of data or a column of data. Pictorially Series( [i, 2, 3, 4, 5], "Rank") can be represented as Rank A Series should support all four arithmetic operations using , -* and /. That is, you must support.add sub mul. and__div. So you should be able to perform these operations on any two Series objects. Datafrane( self, data) will initialize a dataframe from data, a list of lists, where each sublist represents a row of the input data. Datafrane.col[nane] should return the column named by name represented as a Series object. Note that the name of the Series object must match the name passed into..]. Note that you must support.getitem0 to be able to use the notation Datafrane.col[nane] should return the column named by name represented as a Series object. Note that the name of the Series object must match the name passed into..1. Note that you must support_.getiten.) to be able to use the ..1 notation. Datafrane.row[index] should return the row indexed by name as a series objectStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started