In this task, you will write two new classes, namely Series and Dataframe. The S
ID: 3733690 • Letter: I
Question
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 [1, 2, 3, 4, 5], "Rank") can be represented as Rank 2 4 ·A series should support all four arithmetic operations using +,-, *, and /. That is, you must support-add-,-sub mu and__div . So you should be able to perform these operations on any two series objects. Dataframe( self, data ) will initialize a dataframe from data, a list of lists, where each sublist represents a row of the input data Dataframe.col[name] 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__getitem_() to be able to use the I..1 notation.Explanation / Answer
I have tried to provide the code based on the understanding as per the directions.. there may be soe missing parts which you need to put together, given the fact that i dont have the complete context of assigment,
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.