Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Titanic_train.csv is the first image. please use Python. F Pclass Age Cabin . Parch 1 Sibsp 22 38 0 1 1 26 0 1

image text in transcribedimage text in transcribedThe "Titanic_train.csv" is the first image.

please use Python.

F Pclass Age Cabin . Parch 1 Sibsp 22 38 0 1 1 26 0 1 1 0 0 1 35 35 0 0 0 0 0 0 3 1 54 2 27 14 4 0 1 1 1 1 1 0 0 0 1 0 A B 1 Passengerld Survived 2 1 3 2 4 3 5 4 6 5 7 6 8 7 9 8 10 9 11 10 12 11 13 12 14 13 15 14 16 15 17 16 18 17 19 18 20 19 21 20 22 21 23 22 24 23 25 24 26 25 27 26 28 27 29 28 30 29 31 30 D E Name Sex 3 Braund, Mr. male 1 Cumings, Mr female 3 Heikkinen, M female 1 Futrelle, Mrs female 3 Allen, Mr. W male 3 Moran, Mr.J male 1 McCarthy, M male 3 Palsson, Mas male 3 Johnson, Mrs female 2 Nasser, Mrs. female 3 Sandstrom, I female 1 Bonnell, Mis: female 3 Saundercock male 3 Andersson, male 3 Vestrom, Mi female 2 Hewlett, Mrs female 3 Rice, Master male 2 Williams, Mimale 3 Vander Plank female 3 Masselmani, female 2 Fynney, Mr..male 2 Beesley, Mr. male 3 McGowan, female 1 Sloper, Mr. V male 3 Palsson, Mis female 3 Asplund, Mrs female 3 Emir, Mr. Fa male 1 Fortune, Mr. male 3 O'Dwyer, Mi: female 3 Todoroff, Mr male 58 20 39 14 55 2 J K Ticket Fare Embarked O A/5 21171 7.25 S OPC 17599 71.2833 085 C O STON/02. 3: 7.925 S 113803 53.1 C123 S 373450 8.05 S 0 330877 8.4583 Q 0 17463 51.8625 E46 S 1 349909 21.075 S 2 347742 11.1333 S 0 237736 30.0708 1 PP 9549 16.7 G6 S 0 113783 26.55 C103 S O A/5. 2151 8.05 S 5 347082 31.275 S 0 350406 7.8542 S 0 248706 16 S 1 382652 29.125 Q 0 244373 13 S 0 345763 18 S 0 2649 7.225 C 0 239865 26 S 0 248698 13 D56 S 0 330923 8.0292 Q 0 113788 35.5 A6 S 1 349909 21.075 s 5 347077 31.3875 S 0 2631 7.225 2 19950 263 C23 C25 C27 S 0 330959 7.8792 Q 0 349216 7.8958 S 0 0 1 0 0 4 0 1 0 31 1 0 0 1 0 0 35 34 1 0 0 0 1 15 1 0 0 28 8 38 1 0 0 3 1 0 0 3 0 19 1 0 0 Problem 2 The data set "Titanic_train.csv" is Kaggle's training data set for their famous "Titanic" competition. It contains information about a subset of 891 passengers on the Titanic. Download the data set from Canvas. The variables in the file are . . PassengerID (enumerating the passengers from 1-891) Survived (0 = No, 1 = Yes) Pclass (passenger class, 1 = 1st, 2 = 2nd, 3 = 3rd, a proxy for socio-economic status) Name Sex Age: Age is fractional if less than 1. If the age is estimated, is it in the form of xx.5 SibSP (number of siblings and spouses on board. Sibling = brother, sister, stepbrother, stepsister. Spouse = husband, wife (mistresses and fiancs were ignored)) Parch (# of parents / children aboard the Titanic) Ticket (Ticket number) Fare (Passenger fare) Cabin (Cabin number) Embarked (Port of Embarkation: C = Cherbourg, Q = Queenstown, S = Southampton) . Load the data. (Refresh your memory with Lecture 7 if necessary). (a) Write Pandas code to find the percentage of make and female passengers in this data set who survived rounded to three after-decimal digits. Produce a print statement for your answer. # YOUR CODE HERE raise Not ImplementedError() (b) Write Pandas code to find the name(s) and age of the oldest surviving passenger(s) of known age. If there are ties, report all names. Produce a print statement for your answer. * YOUR CODE HERE raise Not ImplementedError() (c) Report the percentage of missing data on "Age" for passengers in 1st, 2nd, 3rd class respectively. Produce print statements for your answer. # YOUR CODE HERE raise Not ImplementedError() (d) Create a Pandas series of the names of all male passengers who have "John" as part of their first, last or middle name. How many names are in that series? # YOUR CODE HERE raise Not ImplementedError()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899

More Books

Students also viewed these Databases questions

Question

4-54. High profits are publicized by management.

Answered: 1 week ago