In [1]:
import pandas as pd
import random
In [2]:
def get_excuse(item):
excuses = pd.read_csv(item)
excuse = random.choice(excuses['excuse'])
name = input('Enter the name of the person you were meeting:')
location = input('Enter the place where you were supposed to go:')
return "Sorry, " + name + ", I could not meet you at " + location + ", " + excuse
get_excuse("excuse.csv")
Out[2]:
In [ ]:
In [ ]: