Question: Need assistance on what code to use in Python for solving the five problems below. In [4]: import numpy as np import pandas as pd

Need assistance on what code to use in Python for solving the five problems below.Need assistance on what code to use in Python for solving thefive problems below. In [4]: import numpy as np import pandas as

In [4]: import numpy as np import pandas as pd import matplotlib.pyplot as plt vacationdata - pd. read_csv ('Vacation Data.csv') origcolumnnames = vacationdata.columns newcolumnnames = origcolumnnames.str.replace("Q\d+:.", "") vacationdata.columns = newcolumnnames In [5]: origcolumnnames = vacationdata.columns origcolumnnames Out[5]: Index ( ['Respondent Number', 'Vacation City', 'Season', 'Year Visited', 'Trip Duration in Days', 'Number of Overseas Trips Taken', Total Trip Cost (includes air)', 'Airfare Cost', 'Amount Spent on Souvenirs', 'First Time to this city', 'Traveled Alone', '011', 'The City had Good Restuarants', '212', My Accomodations were Good', 'Q13', 'There were Good Historical Sites', '014', 'Overall Trip Satisfaction', '015', 'Gender', '016', 'Race/Ethnicity', 'Number of Travelers', 'Age of Traveler', 'Hotel', 'Museums', 'Food', 'Nightlife', Activities', 'Cost', 'Hotel', 'Museums', 'Food', 'Nightlife', 'Activities', 'Cost', 'I would recommend this city', 'Unnamed: 38', '019-224'], dtype='object') In [0]: #Question 1: What are the average, range, and median of Trip Duration in Days? What does this tell you? #your answer below In [1]: #Question 2: Compute a box plot of Number of Overseas Trips Taken. How would you interpret this? #your answer below In [0]: #Question 3: Create a histogram of the amount spent on souveniers. How would you interpret this? #your answer below In [0]: #Question 4: Compute the cross tab of "The City had Good Restuarants" and "Overall Trip Satisfaction". What insight do #your answer below In [0]: #Question 5: For the crosstab above, does the distribution of values match your expectation? Why or why not? #your answer below #hint think Chi^2

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 Databases Questions!