Skip to content

Commit

Permalink
Merge pull request #1 from PythonDeveloper11/srcc
Browse files Browse the repository at this point in the history
Add files via upload
  • Loading branch information
xybytz authored Dec 28, 2021
2 parents d8dfe0d + 24a353c commit ae5c587
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
4 changes: 4 additions & 0 deletions worklist.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
,,,,,,,,,,,,,,,,,
m,i,n,e,c,r,a,f,t, ,t,u,t,o,r,i,n,g
a,p,p,l,e
H,u,g
28 changes: 28 additions & 0 deletions worklist.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from csv import writer
import pandas as pd
#Check if user wants to
print("Would you like to add something to your list or see the list? [y/n]")
answer = input()
#Add work (input) to csv file if the input is "y"
if answer =="y":
print("What do you have for work?")
lst = input()
with open('worklist.csv', 'a') as f_object:


writer_object = writer(f_object)


writer_object.writerow(lst)

f_object.close()
#Print list if the input is "n"
elif answer =="n":
#Allow unlimited fields
work = pd.read_csv("worklist.csv", sep='\t')
#Remove commas from output
work = work.apply(lambda x: x.str.replace(',', ''))
#Print the list
print(work)


0 comments on commit ae5c587

Please sign in to comment.