-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutil.py
More file actions
29 lines (17 loc) · 718 Bytes
/
util.py
File metadata and controls
29 lines (17 loc) · 718 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import pandas as panda
def filter_the_contacts(filename):
all_contacts = panda.read_csv(filename)
all_contacts = all_contacts[["Name", "Given Name"]]
print("Instructions:" + "\nTo break, Enter c")
print("To keep it same as the given name present after - , press k")
wishing_contacts = dict()
for index, row in all_contacts.iterrows():
print(str(row['Name'])+" - "+str(row['Given Name']))
y = input()
if y == 'c':
break
if y == 'k':
wishing_contacts[str(row['Name'])] = str(row['Given Name'])
elif y != '':
wishing_contacts[str(row['Name'])] = y
return wishing_contacts