
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
![Create a dataframe variable 'a' with this dataset. This dataframe should have all the 569 instances,
30 features and the class of 569 instances as 0 (Malignant) or 1 (Benign). The column that contains
the classes should be labeled as 'typeofcancer'. Show the output of the following input:
In [13]:
▸a.shape
[Hints: the outputs should be same as below.
Out [13] (569, 31)
(b) Now create a dataframe variable 'df' by slicing dataframe 'a'. The new dataframe 'df' should
have all the instances, their labels but with the following three features: mean radius, mean
perimeter and mean area. [Hints: use. iloc method to extract necessary columns from 'a’]
(i) Show the first two rows.
[Hint: The output should be same as below.
Out [16]:
0
1
mean radius mean perimeter
17.99
20.57
122.8
132.9
mean area typeofcancer
1001.0
1326.0
(ii) Show the rows with indexes 17, 18, 19, 20, 21.
0
0](https://content.bartleby.com/qna-images/question/2cd2d665-daee-46b8-ac4c-2b4cec66538a/6d71061e-1995-4a83-86fb-671f6be5c71a/ndvqq1_thumbnail.png)
Transcribed Image Text:Create a dataframe variable 'a' with this dataset. This dataframe should have all the 569 instances,
30 features and the class of 569 instances as 0 (Malignant) or 1 (Benign). The column that contains
the classes should be labeled as 'typeofcancer'. Show the output of the following input:
In [13]:
▸a.shape
[Hints: the outputs should be same as below.
Out [13] (569, 31)
(b) Now create a dataframe variable 'df' by slicing dataframe 'a'. The new dataframe 'df' should
have all the instances, their labels but with the following three features: mean radius, mean
perimeter and mean area. [Hints: use. iloc method to extract necessary columns from 'a’]
(i) Show the first two rows.
[Hint: The output should be same as below.
Out [16]:
0
1
mean radius mean perimeter
17.99
20.57
122.8
132.9
mean area typeofcancer
1001.0
1326.0
(ii) Show the rows with indexes 17, 18, 19, 20, 21.
0
0
Expert Solution

arrow_forward
Step 1
pandas:-
A Python module called pandas offers quick, adaptable, and expressive data structures that are intended to make dealing with "relational" or "labeled" data simple and natural. It aspires to serve as Python's core, the high-level building block for performing useful, in-the-real-world data analysis.
Pandas is a term used to describe an open-source Python library that offers high-performance data manipulation. Pandas, which means Econometrics from Multidimensional Data, gets its name from the phrase panel data. Wes McKinney created it in 2008 and uses Python to analyze data.
Step by stepSolved in 3 steps with 1 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- only Voicemail.java files can have input added inbetween lines 4 and 7. not in the gery code sections.arrow_forwardNEED HELP WITH THE THIRD PART ONLY. I ALREADY TRIED IT, BUT MY CODE DOESNT MATCH THE QUESTION, THIS IS LIKE MY 5th TIME TRYING THIS. KEEPS GETTING REJECTED.arrow_forwardUse the "College" data set from the package "ISLR", do the following: Get familiar with the data set. How many variables the data set has? What is the class of the variable "Private"? Add a new column "Enroll.rate" which is the ratio of Enroll v.s. Accept, to the data set. What are the top 10 Universities in terms of "Enroll.rate" (highest student enrollment ratio)? Get a new data frame "Mysubset" with all rows with an "Outstate" fee between 8000-9000 USD. solve using r codearrow_forward
- Written in Python with docstring please if applicable Thank youarrow_forwardAs the first step in writing an application for the local book store, we will design and implement a Book class that will define the data structure of the application. Each book has a name, author, type (paperback, hardback, magazine), integer ID and pageCount. Provide some data validation in the appropriate method to ensure that the ID and pageCount are not negative. Design and implement a Book class with separation, i.e., separate all functions and methods into both the prototype and an implementation below the main. Provide constructor methods for Book(void), Book(name, author), and one for all components Book(name, author, type, ID, pageCount) Provide accessor (get and set) methods for each property as well as a display method. Provide data validation for the ID and pageCount in the appropriate methods. Provide a method to calculate the cost for buying books (with a 7.75% sales tax) according to the following chart: Hardcover: $29.95 per book Paperback:…arrow_forwardThe shape class variable is used to save the shape of the forestfire_df dataframe. Save the result to ff_shape. # TODO 1.1 ff_shape = print(f'The forest fire dataset shape is: {ff_shape}') todo_check([ (ff_shape == (517,13),'The shape recieved for ff_shape did not match the shape (517, 13)') ])arrow_forward
- This is the information after the two pictures. Also, your class should be placed in a namespace "cs_sequence". Here is an example of a simple client program, to give you an idea about how sequences might be used. You can also use this to test your class, but it's far from exhaustive. Keep in mind as you write your class that you should test each member function after you write it. int main() { Sequence s; for (int i = 0; i < 6; i++) { s.insert(i); } for (s.start(); s.is_item(); s.advance()) { cout << s.current() << " "; } cout << endl; } This client program will print the numbers 5 4 3 2 1 0. (They are backward because insert() inserts each new item at the front of the list.) Implementation We will be using the following implementation of type Sequence, which includes 5 data members. numItems. Stores the number of items in the Sequence. headPtr and tailPtr. The head and tail pointers of the linked list. If the Sequence has no items, then these pointers are…arrow_forwardComplete the rotate_text() function that takes 2 parameters, a string data and an integer n. If n is positive, then the function will shift all the characters in data forward by n positions, with characters at the end of the string being moved to the start of the string. If n is 0 then the text remains the same. For example: rotate_text('abcde', rotate_text('abcde', rotate_text('abcde', 1) would return the string 'eabcd' 3) would return the string 'cdeab' 5) would return the string 'abcde' rotate_text('abcde', 6) would return the string 'eabcd' ... and so on. If n is negative, then the function will shift the characters in data backward by n positions, with characters at the start of the string being moved to the end of the string. For example: rotate text('abcde', -1) would return the string 'bcdea'arrow_forwardCreate an instance of the MovieDetails class called new_movie. Then, read three values from input into new_movie's attributes in the following order: year (int) duration (int) title (str)arrow_forward
- Complete the docstring using the information attached (images):def upgrade_stations(threshold: int, num_bikes: int, stations: List["Station"]) -> int: """Modify each station in stations that has a capacity that is less than threshold by adding num_bikes to the capacity and bikes available counts. Modify each station at most once. Return the total number of bikes that were added to the bike share network. Precondition: num_bikes >= 0 >>> handout_copy = [HANDOUT_STATIONS[0][:], HANDOUT_STATIONS[1][:]] >>> upgrade_stations(25, 5, handout_copy) 5 >>> handout_copy[0] == HANDOUT_STATIONS[0] True >>> handout_copy[1] == [7001, 'Lower Jarvis St SMART / The Esplanade', \ 43.647992, -79.370907, 20, 10, 10] True """arrow_forwardhow to add color to country 10]: Index(['Deaths Per 1000 ', 'Dates', 'Country'], dtype='object')No artists with labels found to put in legend. Note that artists whose label start with an underscore are ignored when lege nd() is called with no argument.Deaths Per 1000 People (2005-2021)arrow_forwardUse an appropriate scikit-learn library we used in class to create y_train, y_test, X_train and X_test by splitting the data into 70% train and 30% test datasets. Set random_state to 4 and stratify the subsamples so that train and test datasets have roughly equal proportions of the target's class labels Standardise the data using StandardScaler libraryarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education