In [7]:
import pandas as pd
import numpy as np
excuses=pd.read_csv('/home/sean/git/algorithms/class1/homework/data/excuse.csv')
In [31]:
name=input('Tell me your name -')
destination=input('Now tell me where you would like to go -')
pick=np.random.choice(excuses.index)
excuse=excuses['excuse'][pick]
source=excuses['hyperlink'][pick]
full_excuse=("Sorry, {name}, I was late to {destination} to meet you, {excuse}.\nThis excuse brought to you by {source}").format(
name=name, destination=destination, excuse=excuse, source=source)
print(full_excuse)
In [ ]: