3morrrrr commited on
Commit
f790a97
·
verified ·
1 Parent(s): 9c2f520

Update helper.py

Browse files
Files changed (1) hide show
  1. helper.py +4 -2
helper.py CHANGED
@@ -13,7 +13,7 @@ from sklearn.preprocessing import MinMaxScaler
13
  def assign_main_accounts(creators_file, chatter_files):
14
  """
15
  Process creators and chatter files to assign main accounts to chatters and prepare data for scheduling.
16
- Returns the combined assignments for preview and the processed creator file.
17
  """
18
  # Load and process creators data
19
  creators = pd.read_excel(creators_file)
@@ -48,8 +48,9 @@ def assign_main_accounts(creators_file, chatter_files):
48
  )
49
 
50
  # Assign main accounts to chatters
51
- combined_assignments = []
52
  updated_chatter_files = []
 
 
53
  for idx, chatter_file in enumerate(chatter_files):
54
  shift_name = ["Overnight", "Day", "Prime"][idx]
55
  chatters = pd.read_excel(chatter_file)
@@ -81,6 +82,7 @@ def assign_main_accounts(creators_file, chatter_files):
81
 
82
 
83
 
 
84
  def save_processed_files(assignments, output_dir):
85
  """
86
  Save processed files for main assignments, ensuring chatter names and main accounts are preserved correctly.
 
13
  def assign_main_accounts(creators_file, chatter_files):
14
  """
15
  Process creators and chatter files to assign main accounts to chatters and prepare data for scheduling.
16
+ Returns the updated chatter files, processed creator file, and combined assignments for preview.
17
  """
18
  # Load and process creators data
19
  creators = pd.read_excel(creators_file)
 
48
  )
49
 
50
  # Assign main accounts to chatters
 
51
  updated_chatter_files = []
52
+ combined_assignments = []
53
+
54
  for idx, chatter_file in enumerate(chatter_files):
55
  shift_name = ["Overnight", "Day", "Prime"][idx]
56
  chatters = pd.read_excel(chatter_file)
 
82
 
83
 
84
 
85
+
86
  def save_processed_files(assignments, output_dir):
87
  """
88
  Save processed files for main assignments, ensuring chatter names and main accounts are preserved correctly.