Skip to content

Commit

Permalink
fix splitting groups bug
Browse files Browse the repository at this point in the history
  • Loading branch information
vlaszdunov committed May 20, 2024
1 parent c539328 commit 9ea32d8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/dataparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ def create_list_of_groups(file_content: bytes) -> dict[str, dict[str, int | pd.D

dict_of_groups: dict[str, dict[str, int | pd.DataFrame]] = {}
for i in range(len(zero_indexes)-1):
dict_of_groups[f'Группа {
i+1}'] = {'count': zero_indexes[i+1] - zero_indexes[i]-1}
dict_of_groups[f'Группа {i+1}'].update({
'group_list': all_data[zero_indexes[i]+1:zero_indexes[i+1]].astype(float)})
dict_of_groups[f'Группа {i+1}'] = \
{'count': zero_indexes[i+1] - zero_indexes[i]-1}
dict_of_groups[f'Группа {i+1}']\
.update({'group_list': all_data[zero_indexes[i] + 1:zero_indexes[i+1]].astype(float)})
'''Create dict of study groups with the number of students in them'''

return dict_of_groups
Expand Down

0 comments on commit 9ea32d8

Please sign in to comment.