Skip to content

Commit b2867a1

Browse files
committed
hotfix in df
1 parent 097f0c4 commit b2867a1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

codegreen_core/data/offline.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def _sync_offline_file(country):
111111
print("Files do not exist. Gathering new data.")
112112
try:
113113
data = _gather_energy_data(country, start_time, end_time)
114-
if data :
114+
if not data.empty :
115115
data.to_csv(csv_file_path, index=False)
116116
first_start_time1 = data.iloc[0]["startTime"]
117117
last_start_time1 = data.iloc[-1]["startTime"]

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "codegreen_core"
3-
version = "0.0.7"
3+
version = "0.0.8"
44
description = "This package helps you become aware of the carbon footprint of your computation"
55
authors = ["Anne Hartebrodt <anne.hartebrodt@fau.de>","Shubh Vardhan Jain <shubh.v.jain@fau.de>"]
66
readme = "README.md"

0 commit comments

Comments
 (0)