| @@ 134-149 (lines=16) @@ | ||
| 131 | #list1, list2 = list(dict1['df_1'].items()) |
|
| 132 | #list1, list2 = list(dict1.get('df_'+str(1))) |
|
| 133 | ||
| 134 | def data_frame(dict_cycle, n): |
|
| 135 | """Reads the dictionary of dataframes and returns dataframes for each cycle |
|
| 136 | ||
| 137 | Parameters |
|
| 138 | __________ |
|
| 139 | dict_cycle: Dictionary of dataframes |
|
| 140 | n: cycle number |
|
| 141 | ||
| 142 | Returns: |
|
| 143 | _______ |
|
| 144 | Dataframe correcponding to the cycle number |
|
| 145 | """ |
|
| 146 | list1, list2 = (list(dict_cycle.get('cycle_'+str(n)).items())) |
|
| 147 | zippedList = list(zip(list1[1], list2[1])) |
|
| 148 | data = pd.DataFrame(zippedList, columns = ['Potential' , 'Current']) |
|
| 149 | return data |
|
| 150 | ||
| 151 | ||
| 152 | def plot_fig(dict_cycle, n): |
|
| @@ 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, n): |
|
| 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(n)).items())) |
|
| 95 | zippedList = list(zip(list1[1], list2[1])) |
|
| 96 | data = pd.DataFrame(zippedList, columns = ['Potential' , 'Current']) |
|
| 97 | return data |
|
| 98 | ||
| 99 | def plot_fig(dict_cycle, n): |
|
| 100 | """For basic plotting of the cycle data |
|