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)


Who did you plan to meet?Richard
Where did you plan to meet them?the library

In [3]:
excuse_phrase


Out[3]:
'Sorry, Richard, I was late to the library to meet you, I had a very rough night and woke up sluggish.'