Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use python pandas please~ begin{tabular}{rrrrrrr} & Age & Sex & BP & Cholesterol & Na_to_K & Drug hline 0 & 23 & F &

Use python pandas please~

image text in transcribedimage text in transcribed

\begin{tabular}{rrrrrrr} & Age & Sex & BP & Cholesterol & Na_to_K & Drug \\ \hline 0 & 23 & F & HIGH & HIGH & 25.355 & DrugY \\ 1 & 47 & NaN & LOW & HIGH & 13.093 & DrugY \\ 2 & 47 & NaN & LOW & HIGH & 10.114 & DrugY \\ 3 & 28 & F & NORMAL & HIGH & 7.798 & drugX \\ 4 & 61 & F & LOW & HIGH & 18.043 & DrugY \\ & & & & & & \\ 195 & 56 & F & LOW & HIGH & 11.567 & DrugY \\ 196 & 16 & NaN & LOW & HIGH & 12.006 & DrugY \\ 197 & 52 & NaN & NORMAL & HIGH & 9.894 & drugX \\ 198 & 23 & NaN & NORMAL & NORMAL & 14.020 & drugX \\ 199 & 40 & F & LOW & NORMAL & 11.349 & drugX \end{tabular} 200 rows 6 columns 1.5 Transform all the labels that are 'DrugY' in Drug to be value 1 , otherwise, to be 0 . Then transform the type of Drug to be 'int'. \#Question 1.5 code here H2 pts

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

50 Tips And Tricks For MongoDB Developers Get The Most Out Of Your Database

Authors: Kristina Chodorow

1st Edition

1449304613, 978-1449304614

More Books

Students also viewed these Databases questions