Spaces:
Running
Running
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -99,15 +99,14 @@ 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()
|
| 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
|
| 107 |
|
| 108 |
# Calculate standard deviation of each row
|
| 109 |
new_df['I-Support (sd)'] = df.std(axis=1,skipna=True)
|
| 110 |
-
|
|
|
|
| 111 |
return new_df
|
| 112 |
|
| 113 |
|
|
|
|
| 99 |
|
| 100 |
# Create a DataFrame from the new data
|
| 101 |
new_df = pd.DataFrame(new_data)
|
|
|
|
|
|
|
| 102 |
# Calculate I-Support by dividing I-Frequency with num_student
|
| 103 |
new_df['I-Support (mean)'] = new_df['I-Frequency'] / num_student
|
| 104 |
new_df['S-Support'] = new_df['S-Frequency'] / num_student
|
| 105 |
|
| 106 |
# Calculate standard deviation of each row
|
| 107 |
new_df['I-Support (sd)'] = df.std(axis=1,skipna=True)
|
| 108 |
+
new_df=new_df.reset_index()
|
| 109 |
+
new_df.rename(columns={'index': 'Pattern'}, inplace=True)
|
| 110 |
return new_df
|
| 111 |
|
| 112 |
|