Data Science, Data Visualization, Data Analysis, Data, Machine Learning.
sex_mapping = {'male': 0, 'female': 1} embarked_mapping = {'C': 0, 'Q': 1, 'S': 2} sex_num = sex_mapping[sex] embarked_num = embarked_mapping[embarked] # Call the predict_survival function with the widget values prediction = predict_survival(pclass, sex_num, age, fare, embarked_num) # Display the