detquantlib 3.5.0__tar.gz → 3.5.1__tar.gz
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.
- {detquantlib-3.5.0 → detquantlib-3.5.1}/PKG-INFO +1 -1
- {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/data/databases/detdatabase.py +7 -10
- {detquantlib-3.5.0 → detquantlib-3.5.1}/pyproject.toml +1 -1
- {detquantlib-3.5.0 → detquantlib-3.5.1}/LICENSE.txt +0 -0
- {detquantlib-3.5.0 → detquantlib-3.5.1}/README.md +0 -0
- {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/__init__.py +0 -0
- {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/data/__init__.py +0 -0
- {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/data/entsoe/entsoe.py +0 -0
- {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/data/sftp/sftp.py +0 -0
- {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/dates/__init__.py +0 -0
- {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/dates/dates.py +0 -0
- {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/figures/__init__.py +0 -0
- {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/figures/plotly_figures.py +0 -0
- {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/outputs/__init__.py +0 -0
- {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/outputs/outputs_interface.py +0 -0
- {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/stats/__init__.py +0 -0
- {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/stats/data_analysis.py +0 -0
- {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/tradable_products/__init__.py +0 -0
- {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/tradable_products/tradable_products.py +0 -0
- {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/utils/__init__.py +0 -0
- {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/utils/utils.py +0 -0
|
@@ -233,18 +233,16 @@ class DetDatabase:
|
|
|
233
233
|
)
|
|
234
234
|
|
|
235
235
|
# Convert date columns to timezone-aware dates
|
|
236
|
-
cols_date_utc = ["DateTime(UTC)", "UpdateTime(UTC)"]
|
|
236
|
+
cols_date_utc = ["DateTime(UTC)", "UpdateTime(UTC)", "InsertionTimestamp"]
|
|
237
237
|
for c in cols_date_utc:
|
|
238
238
|
if c in df.columns:
|
|
239
239
|
df[c] = df[c].dt.tz_localize("UTC")
|
|
240
|
-
if "InsertionTimestamp" in df.columns:
|
|
241
|
-
df["InsertionTimestamp"] = df["InsertionTimestamp"].dt.tz_localize(timezone)
|
|
242
240
|
|
|
243
241
|
# Add column with delivery date expressed in local timezone
|
|
244
242
|
df[f"DateTime({timezone})"] = df["DateTime(UTC)"].dt.tz_convert(timezone)
|
|
245
243
|
|
|
246
244
|
if not timezone_aware_dates:
|
|
247
|
-
cols_date_all = cols_date_utc + [
|
|
245
|
+
cols_date_all = cols_date_utc + [f"DateTime({timezone})"]
|
|
248
246
|
for c in cols_date_all:
|
|
249
247
|
if c in df.columns:
|
|
250
248
|
df[c] = df[c].dt.tz_localize(None)
|
|
@@ -435,18 +433,16 @@ class DetDatabase:
|
|
|
435
433
|
)
|
|
436
434
|
|
|
437
435
|
# Convert date columns to timezone-aware dates
|
|
438
|
-
cols_date_utc = ["DateTime(UTC)", "UpdateTime(UTC)"]
|
|
436
|
+
cols_date_utc = ["DateTime(UTC)", "UpdateTime(UTC)", "InsertionTimestamp"]
|
|
439
437
|
for c in cols_date_utc:
|
|
440
438
|
if c in df.columns:
|
|
441
439
|
df[c] = df[c].dt.tz_localize("UTC")
|
|
442
|
-
if "InsertionTimestamp" in df.columns:
|
|
443
|
-
df["InsertionTimestamp"] = df["InsertionTimestamp"].dt.tz_localize(timezone)
|
|
444
440
|
|
|
445
441
|
# Add column with delivery date expressed in local timezone
|
|
446
442
|
df[f"DateTime({timezone})"] = df["DateTime(UTC)"].dt.tz_convert(timezone)
|
|
447
443
|
|
|
448
444
|
if not timezone_aware_dates:
|
|
449
|
-
cols_date_all = cols_date_utc + [
|
|
445
|
+
cols_date_all = cols_date_utc + [f"DateTime({timezone})"]
|
|
450
446
|
for c in cols_date_all:
|
|
451
447
|
if c in df.columns:
|
|
452
448
|
df[c] = df[c].dt.tz_localize(None)
|
|
@@ -589,8 +585,9 @@ class DetDatabase:
|
|
|
589
585
|
timezone = commodity_info["Timezone"]
|
|
590
586
|
|
|
591
587
|
# Convert timezone-naive to timezone-aware dates
|
|
592
|
-
|
|
593
|
-
|
|
588
|
+
df["InsertionTimestamp"] = df["InsertionTimestamp"].dt.tz_localize("UTC")
|
|
589
|
+
cols_local_tz = ["TradingDate", "DeliveryStart", "DeliveryEnd"]
|
|
590
|
+
for c in cols_local_tz:
|
|
594
591
|
if c in df.columns:
|
|
595
592
|
df[c] = df[c].dt.tz_localize(timezone)
|
|
596
593
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|