-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from PythonDeveloper11/srcc
Add files via upload
- Loading branch information
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
|
||
|