vivek9 commited on
Commit
6954c34
·
verified ·
1 Parent(s): 913d18b

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +2 -1
utils.py CHANGED
@@ -99,7 +99,8 @@ def process_dataframe(df):
99
 
100
  # Create a DataFrame from the new data
101
  new_df = pd.DataFrame(new_data)
102
- new_df=new_df.reset_index(name='Pattern')
 
103
  # Calculate I-Support by dividing I-Frequency with num_student
104
  new_df['I-Support (mean)'] = new_df['I-Frequency'] / num_student
105
  new_df['S-Support'] = new_df['S-Frequency'] / num_student
 
99
 
100
  # Create a DataFrame from the new data
101
  new_df = pd.DataFrame(new_data)
102
+ new_df=new_df.reset_index()
103
+ new_df.rename(columns={'index': 'Pattern'}, inplace=True)
104
  # Calculate I-Support by dividing I-Frequency with num_student
105
  new_df['I-Support (mean)'] = new_df['I-Frequency'] / num_student
106
  new_df['S-Support'] = new_df['S-Frequency'] / num_student