In [17]:
import pandas as pd
import random
In [3]:
excuse = pd.read_csv("data/excuse.csv")
In [8]:
excuse.head(2)
Out[8]:
In [9]:
len(excuse)
Out[9]:
In [45]:
def get_excuse(name,location,data):
i = random.randint(0,(len(excuse)-1))
print("Sorry", name ,", I'm late to meet you at", location, ",",data['excuse'][i],'.')
print(data['hyperlink'][i])
In [49]:
get_excuse("Richard","Central park",excuse)
In [ ]:
In [ ]: