In [1]:
import pandas as pd
import random
df = pd.read_csv('excuse.csv')
In [2]:
name = input('Who did you plan to meet?')
location = input('Where did you plan to meet them?')
index = random.randint(0, len(df)-1)
excuse = random.choice(df['excuse'])
excuse_phrase = 'Sorry, %s, I was late to %s to meet you, %s.' % (name, location, excuse)
In [3]:
excuse_phrase
Out[3]: