imsciences 0.9.6.4__tar.gz → 0.9.6.6__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.
Potentially problematic release.
This version of imsciences might be problematic. Click here for more details.
- {imsciences-0.9.6.4 → imsciences-0.9.6.6}/PKG-INFO +1 -1
- {imsciences-0.9.6.4 → imsciences-0.9.6.6}/imsciences/pull.py +7 -9
- {imsciences-0.9.6.4 → imsciences-0.9.6.6}/imsciences.egg-info/PKG-INFO +1 -1
- {imsciences-0.9.6.4 → imsciences-0.9.6.6}/setup.py +1 -1
- {imsciences-0.9.6.4 → imsciences-0.9.6.6}/LICENSE.txt +0 -0
- {imsciences-0.9.6.4 → imsciences-0.9.6.6}/README.md +0 -0
- {imsciences-0.9.6.4 → imsciences-0.9.6.6}/imsciences/__init__.py +0 -0
- {imsciences-0.9.6.4 → imsciences-0.9.6.6}/imsciences/geo.py +0 -0
- {imsciences-0.9.6.4 → imsciences-0.9.6.6}/imsciences/mmm.py +0 -0
- {imsciences-0.9.6.4 → imsciences-0.9.6.6}/imsciences/unittesting.py +0 -0
- {imsciences-0.9.6.4 → imsciences-0.9.6.6}/imsciences/vis.py +0 -0
- {imsciences-0.9.6.4 → imsciences-0.9.6.6}/imsciences.egg-info/PKG-INFO-TomG-HP-290722 +0 -0
- {imsciences-0.9.6.4 → imsciences-0.9.6.6}/imsciences.egg-info/SOURCES.txt +0 -0
- {imsciences-0.9.6.4 → imsciences-0.9.6.6}/imsciences.egg-info/dependency_links.txt +0 -0
- {imsciences-0.9.6.4 → imsciences-0.9.6.6}/imsciences.egg-info/requires.txt +0 -0
- {imsciences-0.9.6.4 → imsciences-0.9.6.6}/imsciences.egg-info/top_level.txt +0 -0
- {imsciences-0.9.6.4 → imsciences-0.9.6.6}/setup.cfg +0 -0
|
@@ -444,14 +444,13 @@ class datapull:
|
|
|
444
444
|
df_weekly_start.set_index("Date", inplace=True)
|
|
445
445
|
|
|
446
446
|
# Create individual weekly dummies (optional, uncomment if needed)
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
447
|
+
dummy_columns = {}
|
|
448
|
+
for i, date_index in enumerate(df_weekly_start.index):
|
|
449
|
+
col_name = f"dum_{date_index.strftime('%Y_%m_%d')}"
|
|
450
|
+
dummy_columns[col_name] = [0] * len(df_weekly_start)
|
|
451
|
+
dummy_columns[col_name][i] = 1
|
|
452
|
+
df_dummies = pd.DataFrame(dummy_columns, index=df_weekly_start.index)
|
|
453
|
+
df_weekly_start = pd.concat([df_weekly_start, df_dummies], axis=1)
|
|
455
454
|
|
|
456
455
|
# ---------------------------------------------------------------------
|
|
457
456
|
# 3. Public holidays (daily) from 'holidays' package + each holiday name
|
|
@@ -623,7 +622,6 @@ class datapull:
|
|
|
623
622
|
# 5. Weekly aggregation
|
|
624
623
|
# ---------------------------------------------------------------------
|
|
625
624
|
|
|
626
|
-
# --- Aggregate flags using MAX (1 if any day in week is flagged) ---
|
|
627
625
|
# Select only columns that are indicators/flags (intended for max aggregation)
|
|
628
626
|
flag_cols = [col for col in df_daily.columns if col.startswith('seas_') or col.startswith('is_')]
|
|
629
627
|
# Ensure 'week_start' is present for grouping
|
|
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
|