zen-garden 2.8.5__py3-none-any.whl → 2.8.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zen_garden/utils.py +4 -3
- {zen_garden-2.8.5.dist-info → zen_garden-2.8.6.dist-info}/METADATA +1 -1
- {zen_garden-2.8.5.dist-info → zen_garden-2.8.6.dist-info}/RECORD +6 -6
- {zen_garden-2.8.5.dist-info → zen_garden-2.8.6.dist-info}/WHEEL +0 -0
- {zen_garden-2.8.5.dist-info → zen_garden-2.8.6.dist-info}/entry_points.txt +0 -0
- {zen_garden-2.8.5.dist-info → zen_garden-2.8.6.dist-info}/licenses/LICENSE.txt +0 -0
zen_garden/utils.py
CHANGED
|
@@ -21,6 +21,7 @@ import requests
|
|
|
21
21
|
from importlib.metadata import metadata
|
|
22
22
|
import zipfile
|
|
23
23
|
import io
|
|
24
|
+
import pandas as pd
|
|
24
25
|
|
|
25
26
|
def setup_logger(level=logging.INFO):
|
|
26
27
|
""" set up logger
|
|
@@ -350,10 +351,10 @@ def slice_df_by_index(df,index_tuple) -> dict:
|
|
|
350
351
|
if key in df.index.names:
|
|
351
352
|
if isinstance(index[key], list):
|
|
352
353
|
df = df.loc[df.index.get_level_values(key).isin(index[key])]
|
|
353
|
-
|
|
354
|
-
if index[key] not in df.index.get_level_values(key):
|
|
355
|
-
df = pd.DataFrame(columns=df.columns) # return empty dataframe if value not in index
|
|
354
|
+
elif index[key] in df.index.get_level_values(key):
|
|
356
355
|
df = df.xs(index[key], level=key, drop_level=False)
|
|
356
|
+
else:
|
|
357
|
+
df = pd.DataFrame(columns=df.columns) # return empty dataframe if value not in index
|
|
357
358
|
return df
|
|
358
359
|
|
|
359
360
|
def get_label_position(obj,label:int):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: zen_garden
|
|
3
|
-
Version: 2.8.
|
|
3
|
+
Version: 2.8.6
|
|
4
4
|
Summary: ZEN-garden is an optimization model of energy systems and value chains.
|
|
5
5
|
Author: Alissa Ganter, Johannes Burger, Francesco De Marco, Lukas Kunz, Lukas Schmidt-Engelbertz, Christoph Funke, Paolo Gabrielli, Giovanni Sansavini
|
|
6
6
|
Author-email: Jacob Mannhardt <zen-garden@ethz.ch>
|
|
@@ -3,7 +3,7 @@ zen_garden/__main__.py,sha256=Zrz6zr81gXN3_NLPwWz3a-8HiiRgqGx_OzQHarBcxtQ,2508
|
|
|
3
3
|
zen_garden/default_config.py,sha256=ozz2LBSGSaMH8alEAzh-6ziM9IE9zXM9PfRD3nulAIs,8663
|
|
4
4
|
zen_garden/optimization_setup.py,sha256=Rv_IciR_Y9GF-OaPDDAvTQ2huTuAt94jrWpcDJCQgWQ,42176
|
|
5
5
|
zen_garden/runner.py,sha256=gLjHh3DZbgUAiz5lsnDiSwAZT5RFw52-Pnr1K_nPaMM,7207
|
|
6
|
-
zen_garden/utils.py,sha256=
|
|
6
|
+
zen_garden/utils.py,sha256=GFR-LBIkMA7pDQ46J07mr0ujqyIfNPlI0UVnvBDfHRw,60529
|
|
7
7
|
zen_garden/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
zen_garden/cli/zen_example_cli.py,sha256=hCYlAxM5BdphMzXA5LyHmTN3UiYIhMlG7G9sxYi0G_s,1411
|
|
9
9
|
zen_garden/cli/zen_garden_cli.py,sha256=ikiJZoIP4_D-eoNuo4m2f2Z4ydU0sHLDUpCEWn93nnU,6505
|
|
@@ -34,8 +34,8 @@ zen_garden/preprocess/extract_input_data.py,sha256=PWKdel7s488SELseyAaoFkwXpzJU4
|
|
|
34
34
|
zen_garden/preprocess/parameter_change_log.py,sha256=WNhLYTyuaFkUl_e4QH36W1chpqg00m7zg__PawPogAY,387
|
|
35
35
|
zen_garden/preprocess/time_series_aggregation.py,sha256=v8xRRk4I9WZ2yi7V3I_Ersj2RV1T2WIKslx8ohkMfWI,32112
|
|
36
36
|
zen_garden/preprocess/unit_handling.py,sha256=y78oxoPVqcA3y9aEiyr0MU5zITf2BPNGVKOfyMhhCvY,63040
|
|
37
|
-
zen_garden-2.8.
|
|
38
|
-
zen_garden-2.8.
|
|
39
|
-
zen_garden-2.8.
|
|
40
|
-
zen_garden-2.8.
|
|
41
|
-
zen_garden-2.8.
|
|
37
|
+
zen_garden-2.8.6.dist-info/entry_points.txt,sha256=FkXXB0MgvdZG_p_zPifgXc0G2GSPJi0NncG3hZ8TXkU,232
|
|
38
|
+
zen_garden-2.8.6.dist-info/licenses/LICENSE.txt,sha256=_kEtxPe9gWOwMzdiy8nLzgABiPdMvUS0kaSCOIrEA_E,1101
|
|
39
|
+
zen_garden-2.8.6.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
40
|
+
zen_garden-2.8.6.dist-info/METADATA,sha256=ukkRuihxJjio9vja2mjtSF96nf-9qRKjIjSvAmzEQxE,5648
|
|
41
|
+
zen_garden-2.8.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|