-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmonth_classes.py
More file actions
43 lines (33 loc) · 1.15 KB
/
Copy pathmonth_classes.py
File metadata and controls
43 lines (33 loc) · 1.15 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
from enum import Enum
import pandas as pd
from dataclasses import dataclass
file_path = 'C:\\Users\\TearE\\code\\open-weather-api\\pdxnursery_data.xlsx'
xls = pd.ExcelFile(file_path)
sheet_names = xls.sheet_names
plants_by_period = pd.read_excel(xls, sheet_name='plants by period')
columns = plants_by_period.columns
print(columns)
overwintering = pd.read_excel(xls, sheet_name='overwintering')
ideal_planting = pd.read_excel(xls, sheet_name='ideal planting')
print(plants_by_period)
@dataclass
class Plant:
name: str
overwinter: bool
mulch: bool
cover: bool
# # TODO: Extend plants to specifically MyPlants
# class MyPlant(Plant):
# def __init__(self, name, overwinter, mulch, cover, location, date_planted, nickname=None):
# # Use the superclass initializer for common properties
# super().__init__(name, overwinter, mulch, cover)
# # Add specific data for your plant
# self.location = location
# self.date_planted = date_planted
# self.nickname = nickname
@dataclass
class SeasonalPeriod:
period_name: str
seed_indoor: list[Plant]
seed_outdoor: list[Plant]
plant_starts: list[Plant]