Hi ! Ive tried my best to create a function and its returning a few errors. I would love some help on how to answer this question !The datasetlocation_review_data.csv provided (i can include however should not be needed) contains a series of measurements (i.e., scores) for five emotions (such as sad, happy, surprise, disgust, joy) corresponding to each review made. The box (or boxes and whiskers) plot is a good choice to visualise and compare the emotions in the dataset.Write a functionbox_plot(data, output_name)that takes the input data(type NumPy Array) and output_name(type String) wheredatacontains the data available in thelocation_review_data.csvfile (Hint: Q1) andoutput_nameis the file name (output.png) to be plotted using the below instructions.Make a boxplot for each of the ‘sad’, ‘happy’, ‘surprise’, ‘disgust’, and ‘joy’ emotions from the data, in the order provided.Figure size should be set to (10, 8).The linestyle is set to ‘-‘, linewidth = 2, and color to red (hint: lookup medianprops).Patch_artist of the boxplot is set to True.Set the facecolor order as brown, yellow, blue, white, cyan.Set the title to be ‘Distribution of Review Emotions’.Add x-axis data labels ‘Sad’, ‘Happy’, ‘Surprise’, ‘Disgust’, ‘Joy’ in this order.Set the y-axis grid to True.Set the x-axis label to ‘Emotions’.Set the y-axis label to ‘Scores’.Finally, save the graph asoutput_namewith a default value “output.png”The expected output is shown below using the provided using the sample dataset (location_review_data.csv).The function will be tested in PYTHON SHELL!For example:TestResultdata = data_type_format(load_mydata(“location_review_data.csv”), [0, 1, 2, 3])box_plot(data)ans(data)val = main(“output.png”, “answer.png”)if val <= 0.05: print(“Pass!”)else: print(“Your graph is different to the expected output, difference: {:.4f}”.format(val))Pass!Computer ScienceEngineering & TechnologyPython Programming CITS 2401
solved : Hi ! Ive tried my best to create a function and its returnin
How it works
- Paste your instructions in the instructions box. You can also attach an instructions file
- Select the writer category, deadline, education level and review the instructionsÂ
- Make a payment for the order to be assigned to a writer
- Â Download the paper after the writer uploads itÂ
Will the writer plagiarize my essay?
You will get a plagiarism-free paper and you can get an originality report upon request.
Is this service safe?
All the personal information is confidential and we have 100% safe payment methods. We also guarantee good grades
LET THE PROFESSIONALS WRITE YOUR PAPER!