In [2]:
import pandas as pd
excuses_df= pd.read_csv("data/excuse.csv")
In [3]:
excuses_df.head()
Out[3]:
In [4]:
excuse = ""
In [5]:
person = input('Enter your name: ')
In [6]:
location = input('Where was the mayor supposed to meet you? ')
In [38]:
import random
#stop = len(excuses_df)
In [48]:
#random_excuse = excuses_df['excuse'][random.randrange(stop)]
#print(type(random_excuse))
In [49]:
# print("Sorry,", person, "I was late to", location, 'to meet you,', random_excuse)
In [50]:
stop = len(excuses_df)
random_index = random.randrange(stop)
link = excuses_df['hyperlink'][random_index]
random_excuse = excuses_df['excuse'][random_index]
print("Sorry,", person, "I was late to", location, 'to meet you,', random_excuse, "url: " , link)
In [ ]:
In [ ]: