Use the sacramento.csv file to complete the following assignment. Create a file, sacramento.py, that loads the .csv file
Posted: Fri Jul 01, 2022 5:39 am
Use the sacramento.csv file to complete the followingassignment. Create a file, sacramento.py, that loads the .csv fileand runs a logistic regression. The regression should predictwhether or not a house has 1 or more than one bathroom based onbeds, sqft, and price, in that order. You will need to create a newvariable from baths, and it should make it such that thoseobservations of 1 bath correspond to a value of 0, and those withmore than 1 bath correspond to a 1. Make sure to add a constantusing sm.add_constant(X) Your file should print the results in thisway: print(mod.params.round(2)) print(mod.pvalues.round(2))print('The smallest p-value is for sqft')