Question: I just written this code for this question, please see the message at the bottom after I have ran the code and please advise what

I just written this code for this question, please see the message at the bottom after I have ran the code and please advise what could be wrong then fix it for me.
We've loaded a dataset below relating to fraud on an E-commerce website. The fields in the dataset are
'user_id','browser', 'age', 'purchase_value', "fraud'.
Find the count of different types of browsers used in this dataset. Save the result as browser_counts and
print it.
Using the list of unique browser types obtained in the previous step, convert browser to a categorical
variable type ('category').
Using cat.codes, calculate the value that corresponds to the median value of browser, save it as a
variable named median_browser_used and print the result.
Did you use .value_counts() to get counts of browsers used by type?
I just written this code for this question,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!