| @@ 130-145 (lines=16) @@ | ||
| 127 | #list1, list2 = list(dict1.get('df_'+str(1))) |
|
| 128 | ||
| 129 | ||
| 130 | def data_frame(dict_cycle, number): |
|
| 131 | """Reads the dictionary of dataframes and returns dataframes for each cycle |
|
| 132 | ||
| 133 | Parameters |
|
| 134 | __________ |
|
| 135 | dict_cycle: Dictionary of dataframes |
|
| 136 | n: cycle number |
|
| 137 | ||
| 138 | Returns: |
|
| 139 | _______ |
|
| 140 | Dataframe correcponding to the cycle number |
|
| 141 | """ |
|
| 142 | list1, list2 = (list(dict_cycle.get('cycle_'+str(number)).items())) |
|
| 143 | zipped_list = list(zip(list1[1], list2[1])) |
|
| 144 | data = pd.DataFrame(zipped_list, columns=['Potential', 'Current']) |
|
| 145 | return data |
|
| 146 | ||
| 147 | ||
| 148 | def plot_fig(dict_cycle, number): |
|
| @@ 82-97 (lines=16) @@ | ||
| 79 | #list1, list2 = list(dict1['df_1'].items()) |
|
| 80 | #list1, list2 = list(dict1.get('df_'+str(1))) |
|
| 81 | ||
| 82 | def data_frame(dict_cycle, number): |
|
| 83 | """Reads the dictionary of dataframes and returns dataframes for each cycle |
|
| 84 | ||
| 85 | Parameters |
|
| 86 | __________ |
|
| 87 | dict_cycle: Dictionary of dataframes |
|
| 88 | n: cycle number |
|
| 89 | ||
| 90 | Returns: |
|
| 91 | _______ |
|
| 92 | Dataframe correcponding to the cycle number |
|
| 93 | """ |
|
| 94 | list1, list2 = (list(dict_cycle.get('cycle_'+str(number)).items())) |
|
| 95 | zipped_list = list(zip(list1[1], list2[1])) |
|
| 96 | data = pd.DataFrame(zipped_list, columns=['Potential', 'Current']) |
|
| 97 | return data |
|
| 98 | ||
| 99 | def plot_fig(dict_cycle, number): |
|
| 100 | """For basic plotting of the cycle data |
|