MCPcopy Create free account
hub / github.com/IntelligentSystemsLab/ST-EVCDP / read_dataset

Function read_dataset

functions.py:9–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7
8
9def read_dataset():
10 occ = pd.read_csv('datasets/occupancy.csv', index_col=0, header=0)
11 inf = pd.read_csv('datasets/information.csv', index_col=None, header=0)
12 prc = pd.read_csv('datasets/price.csv', index_col=0, header=0)
13 adj = pd.read_csv('datasets/adj.csv', index_col=0, header=0) # check
14 dis = pd.read_csv('datasets/distance.csv', index_col=0, header=0)
15 time = pd.read_csv('datasets/time.csv', index_col=None, header=0)
16
17 col = occ.columns
18 cap = np.array(inf['count'], dtype=float).reshape(1, -1) # parking_capability
19 occ = np.array(occ, dtype=float) / cap
20 prc = np.array(prc, dtype=float)
21 adj = np.array(adj, dtype=float)
22 dis = np.array(dis, dtype=float)
23 time = pd.to_datetime(time, dayfirst=True)
24 return occ, prc, adj, col, dis, cap, time, inf
25
26
27# ---------data transform-----------

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected