🔨 Changes sleep enum
This commit is contained in:
parent
cb4241ff97
commit
7a96f1e82c
4
CLEAN.md
4
CLEAN.md
@ -66,7 +66,7 @@ The cleaned dataset will have the following structure:
|
|||||||
### Sleep
|
### Sleep
|
||||||
|
|
||||||
```
|
```
|
||||||
0 - long sleepers
|
0 - short sleepers
|
||||||
1 - medium sleepers
|
1 - medium sleepers
|
||||||
2 - short sleepers
|
2 - long sleepers
|
||||||
```
|
```
|
||||||
|
@ -4,9 +4,9 @@ from analyze import analyze
|
|||||||
|
|
||||||
dataset = np.load("clean.npy")
|
dataset = np.load("clean.npy")
|
||||||
print(f"dataset shape: {dataset.shape}, analyzing column 10 (sleep)")
|
print(f"dataset shape: {dataset.shape}, analyzing column 10 (sleep)")
|
||||||
print("\t0 - long sleepers")
|
print("\t0 - short sleepers")
|
||||||
print("\t1 - medium sleepers")
|
print("\t1 - medium sleepers")
|
||||||
print("\t2 - short sleepers")
|
print("\t2 - long sleepers")
|
||||||
print("")
|
print("")
|
||||||
|
|
||||||
|
|
||||||
|
6
clean.py
6
clean.py
@ -112,11 +112,11 @@ def parse_commute(txt: str) -> int:
|
|||||||
|
|
||||||
def parse_sleep(txt: str) -> int:
|
def parse_sleep(txt: str) -> int:
|
||||||
match txt:
|
match txt:
|
||||||
case "9 hodín a viac":
|
case "6 hodín a menej":
|
||||||
return 0
|
return 0
|
||||||
case "7 až 9 hodín":
|
case "7 až 9 hodín":
|
||||||
return 1
|
return 1
|
||||||
case "6 hodín a menej":
|
case "9 hodín a viac":
|
||||||
return 2
|
return 2
|
||||||
case _:
|
case _:
|
||||||
print("ERROR: Coudln't determine sleep")
|
print("ERROR: Coudln't determine sleep")
|
||||||
@ -132,7 +132,7 @@ def parse_absence(txt: str) -> float:
|
|||||||
txt = input("Please enter fixed value: ")
|
txt = input("Please enter fixed value: ")
|
||||||
|
|
||||||
|
|
||||||
for i in range(1, len(df)):
|
for i in range(len(arr)):
|
||||||
row = arr[i]
|
row = arr[i]
|
||||||
current = []
|
current = []
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user