imsciences 0.9.6.4__tar.gz → 0.9.6.5__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: imsciences
3
- Version: 0.9.6.4
3
+ Version: 0.9.6.5
4
4
  Summary: IMS Data Processing Package
5
5
  Author: IMS
6
6
  Author-email: cam@im-sciences.com
@@ -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
- # 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)
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: imsciences
3
- Version: 0.9.6.4
3
+ Version: 0.9.6.5
4
4
  Summary: IMS Data Processing Package
5
5
  Author: IMS
6
6
  Author-email: cam@im-sciences.com
@@ -8,7 +8,7 @@ def read_md(file_name):
8
8
  return f.read()
9
9
  return ''
10
10
 
11
- VERSION = '0.9.6.4'
11
+ VERSION = '0.9.6.5'
12
12
  DESCRIPTION = 'IMS Data Processing Package'
13
13
  LONG_DESCRIPTION = read_md('README.md')
14
14
 
File without changes
File without changes
File without changes