-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDailyChecks.py
More file actions
58 lines (46 loc) · 1.93 KB
/
Copy pathDailyChecks.py
File metadata and controls
58 lines (46 loc) · 1.93 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import pandas as pd
import numpy as np
#The first param is your name and the second param is a int that if it is 1 it
#counts for the first half of the week and if its 2 the second half
def YourRooms(name):
sheet_id = ''
df = pd.read_csv(f"https://docs.google.com/spreadsheets/d/{sheet_id}/export?format=csv")
# df = pd.read_csv('Daily Checks - 4_3-4_7.csv', header = 1)
arr = df.to_numpy()
print(name,'Rooms to Check')
NumOfRooms = 0;
return_value = ''
# loop through the rows of the array
for i in range(arr.shape[0]):
# loop through the columns of the array
for j in range(12):
if(name == arr[i][j]):
# print the current cell value
print(arr[i][j-1])
NumOfRooms = NumOfRooms+1
return_value += arr[i][j-1] + " | "
# loop through the rows of the array
for i in range(arr.shape[0]):
# loop through the columns of the array
for j in range(13,21):
if(name == arr[i][j]):
# print the current cell value
print(arr[i][j-1])
NumOfRooms = NumOfRooms + 1
return_value += arr[i][j-1] + " | "
return return_value
def RoomsLeft(name):
sheet_id = '1Tqvx93IeyNNW_jgs4O6YxkSVYAb-eyfF-6OHnSciIRU'
df = pd.read_csv(f"https://docs.google.com/spreadsheets/d/{sheet_id}/export?format=csv")
# df = pd.read_csv('Daily Checks - 4_3-4_7.csv', header = 1)
arr = df.to_numpy()
print(name,'Rooms you have left')
return_value = '';
# loop through the rows of the array
for i in range(arr.shape[0]):
# loop through the columns of the array
for j in range(arr.shape[1]):
if(name == arr[i][j]):
# print the current cell value
print(arr[i][j-1])
return_value += arr[i][j-1] + " | "