Write a function that takes in the three attributes of a Simpson character and outputs the gender classification.
Remember what we're splitting on
Test the function with the Comic's attributes
Submit your code and give feedback on the Do Now in your PR
In [9]:
import pandas as pd
%matplotlib inline
import math
import matplotlib.pyplot as plt
from sklearn.linear_model import LinearRegression
import numpy as np
In [17]:
df = pd.read_excel("simpson-eg.xlsx")
df
Out[17]:
In [25]:
def simpson_classifier(hair, weight, age):
if weight <= 160:
return "Female"
else:
return "Male"
In [26]:
simpson_classifier(8,290, 38)
Out[26]:
In [ ]: