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entrenamiento,\n",
|
10 |
+
" opciones_cumplimiento_dieta, opciones_compromiso, diferencia_peso_options)\n",
|
11 |
+
"import pandas as pd\n",
|
12 |
+
"from tqdm import tqdm"
|
13 |
+
]
|
14 |
+
},
|
15 |
+
{
|
16 |
+
"cell_type": "code",
|
17 |
+
"execution_count": 2,
|
18 |
+
"metadata": {},
|
19 |
+
"outputs": [],
|
20 |
+
"source": [
|
21 |
+
"anterior_peso_list = list(range(50, 150, 2))\n",
|
22 |
+
"peso_actual_list = list(range(50, 150, 2))"
|
23 |
+
]
|
24 |
+
},
|
25 |
+
{
|
26 |
+
"cell_type": "code",
|
27 |
+
"execution_count": 3,
|
28 |
+
"metadata": {},
|
29 |
+
"outputs": [],
|
30 |
+
"source": [
|
31 |
+
"dataframe = pd.DataFrame()"
|
32 |
+
]
|
33 |
+
},
|
34 |
+
{
|
35 |
+
"cell_type": "code",
|
36 |
+
"execution_count": 4,
|
37 |
+
"metadata": {},
|
38 |
+
"outputs": [
|
39 |
+
{
|
40 |
+
"name": "stderr",
|
41 |
+
"output_type": "stream",
|
42 |
+
"text": [
|
43 |
+
"Creating dataframe: 99%|█████████▉| 6279720/6350400 [00:07<00:00, 823917.54it/s]"
|
44 |
+
]
|
45 |
+
},
|
46 |
+
{
|
47 |
+
"name": "stdout",
|
48 |
+
"output_type": "stream",
|
49 |
+
"text": [
|
50 |
+
"6350400\n"
|
51 |
+
]
|
52 |
+
},
|
53 |
+
{
|
54 |
+
"data": {
|
55 |
+
"text/html": [
|
56 |
+
"<div>\n",
|
57 |
+
"<style scoped>\n",
|
58 |
+
" .dataframe tbody tr th:only-of-type {\n",
|
59 |
+
" vertical-align: middle;\n",
|
60 |
+
" }\n",
|
61 |
+
"\n",
|
62 |
+
" .dataframe tbody tr th {\n",
|
63 |
+
" vertical-align: top;\n",
|
64 |
+
" }\n",
|
65 |
+
"\n",
|
66 |
+
" .dataframe thead th {\n",
|
67 |
+
" text-align: right;\n",
|
68 |
+
" }\n",
|
69 |
+
"</style>\n",
|
70 |
+
"<table border=\"1\" class=\"dataframe\">\n",
|
71 |
+
" <thead>\n",
|
72 |
+
" <tr style=\"text-align: right;\">\n",
|
73 |
+
" <th></th>\n",
|
74 |
+
" <th>anterior_peso</th>\n",
|
75 |
+
" <th>peso_actual</th>\n",
|
76 |
+
" <th>diferencia_peso</th>\n",
|
77 |
+
" <th>objetivo</th>\n",
|
78 |
+
" <th>esfuerzo</th>\n",
|
79 |
+
" <th>cumplimiento_entrenamiento</th>\n",
|
80 |
+
" <th>cumplimiento_dieta</th>\n",
|
81 |
+
" <th>compromiso</th>\n",
|
82 |
+
" </tr>\n",
|
83 |
+
" </thead>\n",
|
84 |
+
" <tbody>\n",
|
85 |
+
" <tr>\n",
|
86 |
+
" <th>0</th>\n",
|
87 |
+
" <td>60</td>\n",
|
88 |
+
" <td>60</td>\n",
|
89 |
+
" <td>0</td>\n",
|
90 |
+
" <td>definición (nada cambia)</td>\n",
|
91 |
+
" <td>No entiendo la calculadora, quiero menús tipo</td>\n",
|
92 |
+
" <td>Lo hice perfecto</td>\n",
|
93 |
+
" <td>al 70%</td>\n",
|
94 |
+
" <td>Bueno, pero mejorable</td>\n",
|
95 |
+
" </tr>\n",
|
96 |
+
" <tr>\n",
|
97 |
+
" <th>1</th>\n",
|
98 |
+
" <td>60</td>\n",
|
99 |
+
" <td>60</td>\n",
|
100 |
+
" <td>0</td>\n",
|
101 |
+
" <td>definición (nada cambia)</td>\n",
|
102 |
+
" <td>No entiendo la calculadora, quiero menús tipo</td>\n",
|
103 |
+
" <td>Lo hice perfecto</td>\n",
|
104 |
+
" <td>al 70%</td>\n",
|
105 |
+
" <td>Mal, pero a partir de ahora voy a por todas</td>\n",
|
106 |
+
" </tr>\n",
|
107 |
+
" <tr>\n",
|
108 |
+
" <th>2</th>\n",
|
109 |
+
" <td>60</td>\n",
|
110 |
+
" <td>60</td>\n",
|
111 |
+
" <td>0</td>\n",
|
112 |
+
" <td>definición (nada cambia)</td>\n",
|
113 |
+
" <td>No entiendo la calculadora, quiero menús tipo</td>\n",
|
114 |
+
" <td>Lo hice perfecto</td>\n",
|
115 |
+
" <td>al 70%</td>\n",
|
116 |
+
" <td>Mal, demasiado exigente</td>\n",
|
117 |
+
" </tr>\n",
|
118 |
+
" <tr>\n",
|
119 |
+
" <th>3</th>\n",
|
120 |
+
" <td>60</td>\n",
|
121 |
+
" <td>60</td>\n",
|
122 |
+
" <td>0</td>\n",
|
123 |
+
" <td>definición (nada cambia)</td>\n",
|
124 |
+
" <td>No entiendo la calculadora, quiero menús tipo</td>\n",
|
125 |
+
" <td>Lo hice perfecto</td>\n",
|
126 |
+
" <td>al 70%</td>\n",
|
127 |
+
" <td>Máximo</td>\n",
|
128 |
+
" </tr>\n",
|
129 |
+
" <tr>\n",
|
130 |
+
" <th>4</th>\n",
|
131 |
+
" <td>60</td>\n",
|
132 |
+
" <td>60</td>\n",
|
133 |
+
" <td>0</td>\n",
|
134 |
+
" <td>definición (nada cambia)</td>\n",
|
135 |
+
" <td>No entiendo la calculadora, quiero menús tipo</td>\n",
|
136 |
+
" <td>Lo hice perfecto</td>\n",
|
137 |
+
" <td>regular, me cuesta llegar</td>\n",
|
138 |
+
" <td>Bueno, pero mejorable</td>\n",
|
139 |
+
" </tr>\n",
|
140 |
+
" </tbody>\n",
|
141 |
+
"</table>\n",
|
142 |
+
"</div>"
|
143 |
+
],
|
144 |
+
"text/plain": [
|
145 |
+
" anterior_peso peso_actual diferencia_peso objetivo \\\n",
|
146 |
+
"0 60 60 0 definición (nada cambia) \n",
|
147 |
+
"1 60 60 0 definición (nada cambia) \n",
|
148 |
+
"2 60 60 0 definición (nada cambia) \n",
|
149 |
+
"3 60 60 0 definición (nada cambia) \n",
|
150 |
+
"4 60 60 0 definición (nada cambia) \n",
|
151 |
+
"\n",
|
152 |
+
" esfuerzo cumplimiento_entrenamiento \\\n",
|
153 |
+
"0 No entiendo la calculadora, quiero menús tipo Lo hice perfecto \n",
|
154 |
+
"1 No entiendo la calculadora, quiero menús tipo Lo hice perfecto \n",
|
155 |
+
"2 No entiendo la calculadora, quiero menús tipo Lo hice perfecto \n",
|
156 |
+
"3 No entiendo la calculadora, quiero menús tipo Lo hice perfecto \n",
|
157 |
+
"4 No entiendo la calculadora, quiero menús tipo Lo hice perfecto \n",
|
158 |
+
"\n",
|
159 |
+
" cumplimiento_dieta compromiso \n",
|
160 |
+
"0 al 70% Bueno, pero mejorable \n",
|
161 |
+
"1 al 70% Mal, pero a partir de ahora voy a por todas \n",
|
162 |
+
"2 al 70% Mal, demasiado exigente \n",
|
163 |
+
"3 al 70% Máximo \n",
|
164 |
+
"4 regular, me cuesta llegar Bueno, pero mejorable "
|
165 |
+
]
|
166 |
+
},
|
167 |
+
"execution_count": 4,
|
168 |
+
"metadata": {},
|
169 |
+
"output_type": "execute_result"
|
170 |
+
}
|
171 |
+
],
|
172 |
+
"source": [
|
173 |
+
"rows_list = []\n",
|
174 |
+
"\n",
|
175 |
+
"num_combinations = len(anterior_peso_list) * len(peso_actual_list) * len(opciones_objetivo) * len(opciones_esfuerzo) * len(opciones_cumplimiento_entrenamiento) * len(opciones_cumplimiento_dieta) * len(opciones_compromiso)\n",
|
176 |
+
"progress_bar = tqdm(total=num_combinations, desc=\"Creating dataframe\")\n",
|
177 |
+
"\n",
|
178 |
+
"for anterior_peso in anterior_peso_list:\n",
|
179 |
+
" for peso_actual in peso_actual_list:\n",
|
180 |
+
" for objetivo in opciones_objetivo:\n",
|
181 |
+
" for esfuerzo in opciones_esfuerzo:\n",
|
182 |
+
" for cumplimiento_entrenamiento in opciones_cumplimiento_entrenamiento:\n",
|
183 |
+
" for cumplimiento_dieta in opciones_cumplimiento_dieta:\n",
|
184 |
+
" for compromiso in opciones_compromiso:\n",
|
185 |
+
" row = {\n",
|
186 |
+
" 'anterior_peso': anterior_peso,\n",
|
187 |
+
" 'peso_actual': peso_actual,\n",
|
188 |
+
" 'diferencia_peso': peso_actual - anterior_peso,\n",
|
189 |
+
" 'objetivo': objetivo[list(objetivo.keys())[0]]['text'],\n",
|
190 |
+
" 'esfuerzo': esfuerzo[list(esfuerzo.keys())[0]]['text'],\n",
|
191 |
+
" 'cumplimiento_entrenamiento': cumplimiento_entrenamiento[list(cumplimiento_entrenamiento.keys())[0]]['text'],\n",
|
192 |
+
" 'cumplimiento_dieta': cumplimiento_dieta[list(cumplimiento_dieta.keys())[0]]['text'],\n",
|
193 |
+
" 'compromiso': compromiso[list(compromiso.keys())[0]]['text']\n",
|
194 |
+
" }\n",
|
195 |
+
" rows_list.append(row)\n",
|
196 |
+
" progress_bar.update(1)\n",
|
197 |
+
"dataframe = pd.DataFrame(rows_list)\n",
|
198 |
+
"del rows_list\n",
|
199 |
+
"print(num_combinations)\n",
|
200 |
+
"dataframe.head()\n"
|
201 |
+
]
|
202 |
+
},
|
203 |
+
{
|
204 |
+
"cell_type": "code",
|
205 |
+
"execution_count": 5,
|
206 |
+
"metadata": {},
|
207 |
+
"outputs": [
|
208 |
+
{
|
209 |
+
"data": {
|
210 |
+
"text/html": [
|
211 |
+
"<div>\n",
|
212 |
+
"<style scoped>\n",
|
213 |
+
" .dataframe tbody tr th:only-of-type {\n",
|
214 |
+
" vertical-align: middle;\n",
|
215 |
+
" }\n",
|
216 |
+
"\n",
|
217 |
+
" .dataframe tbody tr th {\n",
|
218 |
+
" vertical-align: top;\n",
|
219 |
+
" }\n",
|
220 |
+
"\n",
|
221 |
+
" .dataframe thead th {\n",
|
222 |
+
" text-align: right;\n",
|
223 |
+
" }\n",
|
224 |
+
"</style>\n",
|
225 |
+
"<table border=\"1\" class=\"dataframe\">\n",
|
226 |
+
" <thead>\n",
|
227 |
+
" <tr style=\"text-align: right;\">\n",
|
228 |
+
" <th></th>\n",
|
229 |
+
" <th>diferencia_peso</th>\n",
|
230 |
+
" </tr>\n",
|
231 |
+
" </thead>\n",
|
232 |
+
" <tbody>\n",
|
233 |
+
" <tr>\n",
|
234 |
+
" <th>0</th>\n",
|
235 |
+
" <td>-58</td>\n",
|
236 |
+
" </tr>\n",
|
237 |
+
" <tr>\n",
|
238 |
+
" <th>1</th>\n",
|
239 |
+
" <td>-56</td>\n",
|
240 |
+
" </tr>\n",
|
241 |
+
" <tr>\n",
|
242 |
+
" <th>2</th>\n",
|
243 |
+
" <td>-54</td>\n",
|
244 |
+
" </tr>\n",
|
245 |
+
" <tr>\n",
|
246 |
+
" <th>3</th>\n",
|
247 |
+
" <td>-52</td>\n",
|
248 |
+
" </tr>\n",
|
249 |
+
" <tr>\n",
|
250 |
+
" <th>4</th>\n",
|
251 |
+
" <td>-50</td>\n",
|
252 |
+
" </tr>\n",
|
253 |
+
" </tbody>\n",
|
254 |
+
"</table>\n",
|
255 |
+
"</div>"
|
256 |
+
],
|
257 |
+
"text/plain": [
|
258 |
+
" diferencia_peso\n",
|
259 |
+
"0 -58\n",
|
260 |
+
"1 -56\n",
|
261 |
+
"2 -54\n",
|
262 |
+
"3 -52\n",
|
263 |
+
"4 -50"
|
264 |
+
]
|
265 |
+
},
|
266 |
+
"execution_count": 5,
|
267 |
+
"metadata": {},
|
268 |
+
"output_type": "execute_result"
|
269 |
+
}
|
270 |
+
],
|
271 |
+
"source": [
|
272 |
+
"diferencias_peso_list = dataframe['diferencia_peso'].unique()\n",
|
273 |
+
"diferencias_peso_list.sort()\n",
|
274 |
+
"diferencias_peso_dataframe = pd.DataFrame(diferencias_peso_list, columns=['diferencia_peso'])\n",
|
275 |
+
"diferencias_peso_dataframe.head()"
|
276 |
+
]
|
277 |
+
},
|
278 |
+
{
|
279 |
+
"cell_type": "code",
|
280 |
+
"execution_count": 6,
|
281 |
+
"metadata": {},
|
282 |
+
"outputs": [
|
283 |
+
{
|
284 |
+
"data": {
|
285 |
+
"text/html": [
|
286 |
+
"<div>\n",
|
287 |
+
"<style scoped>\n",
|
288 |
+
" .dataframe tbody tr th:only-of-type {\n",
|
289 |
+
" vertical-align: middle;\n",
|
290 |
+
" }\n",
|
291 |
+
"\n",
|
292 |
+
" .dataframe tbody tr th {\n",
|
293 |
+
" vertical-align: top;\n",
|
294 |
+
" }\n",
|
295 |
+
"\n",
|
296 |
+
" .dataframe thead th {\n",
|
297 |
+
" text-align: right;\n",
|
298 |
+
" }\n",
|
299 |
+
"</style>\n",
|
300 |
+
"<table border=\"1\" class=\"dataframe\">\n",
|
301 |
+
" <thead>\n",
|
302 |
+
" <tr style=\"text-align: right;\">\n",
|
303 |
+
" <th></th>\n",
|
304 |
+
" <th>objetivo</th>\n",
|
305 |
+
" </tr>\n",
|
306 |
+
" </thead>\n",
|
307 |
+
" <tbody>\n",
|
308 |
+
" <tr>\n",
|
309 |
+
" <th>0</th>\n",
|
310 |
+
" <td>definición (nada cambia)</td>\n",
|
311 |
+
" </tr>\n",
|
312 |
+
" <tr>\n",
|
313 |
+
" <th>1</th>\n",
|
314 |
+
" <td>empezamos a coger volumen (cambia)</td>\n",
|
315 |
+
" </tr>\n",
|
316 |
+
" <tr>\n",
|
317 |
+
" <th>2</th>\n",
|
318 |
+
" <td>empezamos a coger volumen, en todo el cuerpo (...</td>\n",
|
319 |
+
" </tr>\n",
|
320 |
+
" <tr>\n",
|
321 |
+
" <th>3</th>\n",
|
322 |
+
" <td>empezamos a coger volumen, sobre todo tren inf...</td>\n",
|
323 |
+
" </tr>\n",
|
324 |
+
" <tr>\n",
|
325 |
+
" <th>4</th>\n",
|
326 |
+
" <td>empezamos a definir (cambia)</td>\n",
|
327 |
+
" </tr>\n",
|
328 |
+
" </tbody>\n",
|
329 |
+
"</table>\n",
|
330 |
+
"</div>"
|
331 |
+
],
|
332 |
+
"text/plain": [
|
333 |
+
" objetivo\n",
|
334 |
+
"0 definición (nada cambia)\n",
|
335 |
+
"1 empezamos a coger volumen (cambia)\n",
|
336 |
+
"2 empezamos a coger volumen, en todo el cuerpo (...\n",
|
337 |
+
"3 empezamos a coger volumen, sobre todo tren inf...\n",
|
338 |
+
"4 empezamos a definir (cambia)"
|
339 |
+
]
|
340 |
+
},
|
341 |
+
"execution_count": 6,
|
342 |
+
"metadata": {},
|
343 |
+
"output_type": "execute_result"
|
344 |
+
}
|
345 |
+
],
|
346 |
+
"source": [
|
347 |
+
"objetivos_list = dataframe['objetivo'].unique()\n",
|
348 |
+
"objetivos_list.sort()\n",
|
349 |
+
"objetivos_dataframe = pd.DataFrame(objetivos_list, columns=['objetivo'])\n",
|
350 |
+
"objetivos_dataframe.head()\n"
|
351 |
+
]
|
352 |
+
},
|
353 |
+
{
|
354 |
+
"cell_type": "code",
|
355 |
+
"execution_count": 7,
|
356 |
+
"metadata": {},
|
357 |
+
"outputs": [
|
358 |
+
{
|
359 |
+
"data": {
|
360 |
+
"text/html": [
|
361 |
+
"<div>\n",
|
362 |
+
"<style scoped>\n",
|
363 |
+
" .dataframe tbody tr th:only-of-type {\n",
|
364 |
+
" vertical-align: middle;\n",
|
365 |
+
" }\n",
|
366 |
+
"\n",
|
367 |
+
" .dataframe tbody tr th {\n",
|
368 |
+
" vertical-align: top;\n",
|
369 |
+
" }\n",
|
370 |
+
"\n",
|
371 |
+
" .dataframe thead th {\n",
|
372 |
+
" text-align: right;\n",
|
373 |
+
" }\n",
|
374 |
+
"</style>\n",
|
375 |
+
"<table border=\"1\" class=\"dataframe\">\n",
|
376 |
+
" <thead>\n",
|
377 |
+
" <tr style=\"text-align: right;\">\n",
|
378 |
+
" <th></th>\n",
|
379 |
+
" <th>esfuerzo</th>\n",
|
380 |
+
" </tr>\n",
|
381 |
+
" </thead>\n",
|
382 |
+
" <tbody>\n",
|
383 |
+
" <tr>\n",
|
384 |
+
" <th>0</th>\n",
|
385 |
+
" <td>Costó demasiado, bájame macros</td>\n",
|
386 |
+
" </tr>\n",
|
387 |
+
" <tr>\n",
|
388 |
+
" <th>1</th>\n",
|
389 |
+
" <td>Costó demasiado, súbeme macros</td>\n",
|
390 |
+
" </tr>\n",
|
391 |
+
" <tr>\n",
|
392 |
+
" <th>2</th>\n",
|
393 |
+
" <td>Costó, pero me adapto a nuevos ajustes</td>\n",
|
394 |
+
" </tr>\n",
|
395 |
+
" <tr>\n",
|
396 |
+
" <th>3</th>\n",
|
397 |
+
" <td>Iba a coger menús tipo, pero al final por prec...</td>\n",
|
398 |
+
" </tr>\n",
|
399 |
+
" <tr>\n",
|
400 |
+
" <th>4</th>\n",
|
401 |
+
" <td>No costó nada</td>\n",
|
402 |
+
" </tr>\n",
|
403 |
+
" </tbody>\n",
|
404 |
+
"</table>\n",
|
405 |
+
"</div>"
|
406 |
+
],
|
407 |
+
"text/plain": [
|
408 |
+
" esfuerzo\n",
|
409 |
+
"0 Costó demasiado, bájame macros\n",
|
410 |
+
"1 Costó demasiado, súbeme macros\n",
|
411 |
+
"2 Costó, pero me adapto a nuevos ajustes\n",
|
412 |
+
"3 Iba a coger menús tipo, pero al final por prec...\n",
|
413 |
+
"4 No costó nada"
|
414 |
+
]
|
415 |
+
},
|
416 |
+
"execution_count": 7,
|
417 |
+
"metadata": {},
|
418 |
+
"output_type": "execute_result"
|
419 |
+
}
|
420 |
+
],
|
421 |
+
"source": [
|
422 |
+
"esfuerzos_list = dataframe['esfuerzo'].unique()\n",
|
423 |
+
"esfuerzos_list.sort()\n",
|
424 |
+
"esfuerzos_dataframe = pd.DataFrame(esfuerzos_list, columns=['esfuerzo'])\n",
|
425 |
+
"esfuerzos_dataframe.head()\n"
|
426 |
+
]
|
427 |
+
},
|
428 |
+
{
|
429 |
+
"cell_type": "code",
|
430 |
+
"execution_count": 8,
|
431 |
+
"metadata": {},
|
432 |
+
"outputs": [
|
433 |
+
{
|
434 |
+
"data": {
|
435 |
+
"text/html": [
|
436 |
+
"<div>\n",
|
437 |
+
"<style scoped>\n",
|
438 |
+
" .dataframe tbody tr th:only-of-type {\n",
|
439 |
+
" vertical-align: middle;\n",
|
440 |
+
" }\n",
|
441 |
+
"\n",
|
442 |
+
" .dataframe tbody tr th {\n",
|
443 |
+
" vertical-align: top;\n",
|
444 |
+
" }\n",
|
445 |
+
"\n",
|
446 |
+
" .dataframe thead th {\n",
|
447 |
+
" text-align: right;\n",
|
448 |
+
" }\n",
|
449 |
+
"</style>\n",
|
450 |
+
"<table border=\"1\" class=\"dataframe\">\n",
|
451 |
+
" <thead>\n",
|
452 |
+
" <tr style=\"text-align: right;\">\n",
|
453 |
+
" <th></th>\n",
|
454 |
+
" <th>cumplimiento_entrenamiento</th>\n",
|
455 |
+
" </tr>\n",
|
456 |
+
" </thead>\n",
|
457 |
+
" <tbody>\n",
|
458 |
+
" <tr>\n",
|
459 |
+
" <th>0</th>\n",
|
460 |
+
" <td>Alárgame la rutina una semana más</td>\n",
|
461 |
+
" </tr>\n",
|
462 |
+
" <tr>\n",
|
463 |
+
" <th>1</th>\n",
|
464 |
+
" <td>He fallado algunos días, pero sí</td>\n",
|
465 |
+
" </tr>\n",
|
466 |
+
" <tr>\n",
|
467 |
+
" <th>2</th>\n",
|
468 |
+
" <td>Lesión importante</td>\n",
|
469 |
+
" </tr>\n",
|
470 |
+
" <tr>\n",
|
471 |
+
" <th>3</th>\n",
|
472 |
+
" <td>Lo hice perfecto</td>\n",
|
473 |
+
" </tr>\n",
|
474 |
+
" <tr>\n",
|
475 |
+
" <th>4</th>\n",
|
476 |
+
" <td>Lo hice prácticamente perfecto</td>\n",
|
477 |
+
" </tr>\n",
|
478 |
+
" </tbody>\n",
|
479 |
+
"</table>\n",
|
480 |
+
"</div>"
|
481 |
+
],
|
482 |
+
"text/plain": [
|
483 |
+
" cumplimiento_entrenamiento\n",
|
484 |
+
"0 Alárgame la rutina una semana más\n",
|
485 |
+
"1 He fallado algunos días, pero sí\n",
|
486 |
+
"2 Lesión importante\n",
|
487 |
+
"3 Lo hice perfecto\n",
|
488 |
+
"4 Lo hice prácticamente perfecto"
|
489 |
+
]
|
490 |
+
},
|
491 |
+
"execution_count": 8,
|
492 |
+
"metadata": {},
|
493 |
+
"output_type": "execute_result"
|
494 |
+
}
|
495 |
+
],
|
496 |
+
"source": [
|
497 |
+
"cumplimiento_entrenamiento_list = dataframe['cumplimiento_entrenamiento'].unique()\n",
|
498 |
+
"cumplimiento_entrenamiento_list.sort()\n",
|
499 |
+
"cumplimiento_entrenamiento_dataframe = pd.DataFrame(cumplimiento_entrenamiento_list, columns=['cumplimiento_entrenamiento'])\n",
|
500 |
+
"cumplimiento_entrenamiento_dataframe.head()"
|
501 |
+
]
|
502 |
+
},
|
503 |
+
{
|
504 |
+
"cell_type": "code",
|
505 |
+
"execution_count": 9,
|
506 |
+
"metadata": {},
|
507 |
+
"outputs": [
|
508 |
+
{
|
509 |
+
"data": {
|
510 |
+
"text/html": [
|
511 |
+
"<div>\n",
|
512 |
+
"<style scoped>\n",
|
513 |
+
" .dataframe tbody tr th:only-of-type {\n",
|
514 |
+
" vertical-align: middle;\n",
|
515 |
+
" }\n",
|
516 |
+
"\n",
|
517 |
+
" .dataframe tbody tr th {\n",
|
518 |
+
" vertical-align: top;\n",
|
519 |
+
" }\n",
|
520 |
+
"\n",
|
521 |
+
" .dataframe thead th {\n",
|
522 |
+
" text-align: right;\n",
|
523 |
+
" }\n",
|
524 |
+
"</style>\n",
|
525 |
+
"<table border=\"1\" class=\"dataframe\">\n",
|
526 |
+
" <thead>\n",
|
527 |
+
" <tr style=\"text-align: right;\">\n",
|
528 |
+
" <th></th>\n",
|
529 |
+
" <th>cumplimiento_dieta</th>\n",
|
530 |
+
" </tr>\n",
|
531 |
+
" </thead>\n",
|
532 |
+
" <tbody>\n",
|
533 |
+
" <tr>\n",
|
534 |
+
" <th>0</th>\n",
|
535 |
+
" <td>Nada, mantén mis macros</td>\n",
|
536 |
+
" </tr>\n",
|
537 |
+
" <tr>\n",
|
538 |
+
" <th>1</th>\n",
|
539 |
+
" <td>Perfecta</td>\n",
|
540 |
+
" </tr>\n",
|
541 |
+
" <tr>\n",
|
542 |
+
" <th>2</th>\n",
|
543 |
+
" <td>al 70%</td>\n",
|
544 |
+
" </tr>\n",
|
545 |
+
" <tr>\n",
|
546 |
+
" <th>3</th>\n",
|
547 |
+
" <td>casi perfecta</td>\n",
|
548 |
+
" </tr>\n",
|
549 |
+
" <tr>\n",
|
550 |
+
" <th>4</th>\n",
|
551 |
+
" <td>regular, me cuesta llegar</td>\n",
|
552 |
+
" </tr>\n",
|
553 |
+
" </tbody>\n",
|
554 |
+
"</table>\n",
|
555 |
+
"</div>"
|
556 |
+
],
|
557 |
+
"text/plain": [
|
558 |
+
" cumplimiento_dieta\n",
|
559 |
+
"0 Nada, mantén mis macros\n",
|
560 |
+
"1 Perfecta\n",
|
561 |
+
"2 al 70%\n",
|
562 |
+
"3 casi perfecta\n",
|
563 |
+
"4 regular, me cuesta llegar"
|
564 |
+
]
|
565 |
+
},
|
566 |
+
"execution_count": 9,
|
567 |
+
"metadata": {},
|
568 |
+
"output_type": "execute_result"
|
569 |
+
}
|
570 |
+
],
|
571 |
+
"source": [
|
572 |
+
"cumplimiento_dieta_list = dataframe['cumplimiento_dieta'].unique()\n",
|
573 |
+
"cumplimiento_dieta_list.sort()\n",
|
574 |
+
"cumplimiento_dieta_dataframe = pd.DataFrame(cumplimiento_dieta_list, columns=['cumplimiento_dieta'])\n",
|
575 |
+
"cumplimiento_dieta_dataframe.head()\n"
|
576 |
+
]
|
577 |
+
},
|
578 |
+
{
|
579 |
+
"cell_type": "code",
|
580 |
+
"execution_count": 10,
|
581 |
+
"metadata": {},
|
582 |
+
"outputs": [
|
583 |
+
{
|
584 |
+
"data": {
|
585 |
+
"text/html": [
|
586 |
+
"<div>\n",
|
587 |
+
"<style scoped>\n",
|
588 |
+
" .dataframe tbody tr th:only-of-type {\n",
|
589 |
+
" vertical-align: middle;\n",
|
590 |
+
" }\n",
|
591 |
+
"\n",
|
592 |
+
" .dataframe tbody tr th {\n",
|
593 |
+
" vertical-align: top;\n",
|
594 |
+
" }\n",
|
595 |
+
"\n",
|
596 |
+
" .dataframe thead th {\n",
|
597 |
+
" text-align: right;\n",
|
598 |
+
" }\n",
|
599 |
+
"</style>\n",
|
600 |
+
"<table border=\"1\" class=\"dataframe\">\n",
|
601 |
+
" <thead>\n",
|
602 |
+
" <tr style=\"text-align: right;\">\n",
|
603 |
+
" <th></th>\n",
|
604 |
+
" <th>compromiso</th>\n",
|
605 |
+
" </tr>\n",
|
606 |
+
" </thead>\n",
|
607 |
+
" <tbody>\n",
|
608 |
+
" <tr>\n",
|
609 |
+
" <th>0</th>\n",
|
610 |
+
" <td>Bueno, pero mejorable</td>\n",
|
611 |
+
" </tr>\n",
|
612 |
+
" <tr>\n",
|
613 |
+
" <th>1</th>\n",
|
614 |
+
" <td>Mal, demasiado exigente</td>\n",
|
615 |
+
" </tr>\n",
|
616 |
+
" <tr>\n",
|
617 |
+
" <th>2</th>\n",
|
618 |
+
" <td>Mal, pero a partir de ahora voy a por todas</td>\n",
|
619 |
+
" </tr>\n",
|
620 |
+
" <tr>\n",
|
621 |
+
" <th>3</th>\n",
|
622 |
+
" <td>Máximo</td>\n",
|
623 |
+
" </tr>\n",
|
624 |
+
" </tbody>\n",
|
625 |
+
"</table>\n",
|
626 |
+
"</div>"
|
627 |
+
],
|
628 |
+
"text/plain": [
|
629 |
+
" compromiso\n",
|
630 |
+
"0 Bueno, pero mejorable\n",
|
631 |
+
"1 Mal, demasiado exigente\n",
|
632 |
+
"2 Mal, pero a partir de ahora voy a por todas\n",
|
633 |
+
"3 Máximo"
|
634 |
+
]
|
635 |
+
},
|
636 |
+
"execution_count": 10,
|
637 |
+
"metadata": {},
|
638 |
+
"output_type": "execute_result"
|
639 |
+
}
|
640 |
+
],
|
641 |
+
"source": [
|
642 |
+
"compromiso_list = dataframe['compromiso'].unique()\n",
|
643 |
+
"compromiso_list.sort()\n",
|
644 |
+
"compromiso_dataframe = pd.DataFrame(compromiso_list, columns=['compromiso'])\n",
|
645 |
+
"compromiso_dataframe.head()\n"
|
646 |
+
]
|
647 |
+
},
|
648 |
+
{
|
649 |
+
"cell_type": "code",
|
650 |
+
"execution_count": 11,
|
651 |
+
"metadata": {},
|
652 |
+
"outputs": [
|
653 |
+
{
|
654 |
+
"ename": "ValueError",
|
655 |
+
"evalue": "This sheet is too large! Your sheet size is: 6350400, 8 Max sheet size is: 1048576, 16384",
|
656 |
+
"output_type": "error",
|
657 |
+
"traceback": [
|
658 |
+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
659 |
+
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
|
660 |
+
"Cell \u001b[0;32mIn[11], line 5\u001b[0m\n\u001b[1;32m 2\u001b[0m writer \u001b[38;5;241m=\u001b[39m pd\u001b[38;5;241m.\u001b[39mExcelWriter(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mopciones_macros.xlsx\u001b[39m\u001b[38;5;124m'\u001b[39m, engine\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mopenpyxl\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[1;32m 4\u001b[0m \u001b[38;5;66;03m# Exportamos cada DataFrame a una hoja diferente\u001b[39;00m\n\u001b[0;32m----> 5\u001b[0m \u001b[43mdataframe\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mto_excel\u001b[49m\u001b[43m(\u001b[49m\u001b[43mwriter\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43msheet_name\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mTodas las combinaciones\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mindex\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mFalse\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m 6\u001b[0m diferencias_peso_dataframe\u001b[38;5;241m.\u001b[39mto_excel(writer, sheet_name\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mDiferencias de peso\u001b[39m\u001b[38;5;124m'\u001b[39m, index\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mFalse\u001b[39;00m)\n\u001b[1;32m 7\u001b[0m objetivos_dataframe\u001b[38;5;241m.\u001b[39mto_excel(writer, sheet_name\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mObjetivos\u001b[39m\u001b[38;5;124m'\u001b[39m, index\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mFalse\u001b[39;00m)\n",
|
661 |
+
"File \u001b[0;32m~/miniforge3/envs/macros_evolution_space/lib/python3.12/site-packages/pandas/util/_decorators.py:333\u001b[0m, in \u001b[0;36mdeprecate_nonkeyword_arguments.<locals>.decorate.<locals>.wrapper\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 327\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mlen\u001b[39m(args) \u001b[38;5;241m>\u001b[39m num_allow_args:\n\u001b[1;32m 328\u001b[0m warnings\u001b[38;5;241m.\u001b[39mwarn(\n\u001b[1;32m 329\u001b[0m msg\u001b[38;5;241m.\u001b[39mformat(arguments\u001b[38;5;241m=\u001b[39m_format_argument_list(allow_args)),\n\u001b[1;32m 330\u001b[0m \u001b[38;5;167;01mFutureWarning\u001b[39;00m,\n\u001b[1;32m 331\u001b[0m stacklevel\u001b[38;5;241m=\u001b[39mfind_stack_level(),\n\u001b[1;32m 332\u001b[0m )\n\u001b[0;32m--> 333\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mfunc\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n",
|
662 |
+
"File \u001b[0;32m~/miniforge3/envs/macros_evolution_space/lib/python3.12/site-packages/pandas/core/generic.py:2417\u001b[0m, in \u001b[0;36mNDFrame.to_excel\u001b[0;34m(self, excel_writer, sheet_name, na_rep, float_format, columns, header, index, index_label, startrow, startcol, engine, merge_cells, inf_rep, freeze_panes, storage_options, engine_kwargs)\u001b[0m\n\u001b[1;32m 2404\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21;01mpandas\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mio\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mformats\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mexcel\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m ExcelFormatter\n\u001b[1;32m 2406\u001b[0m formatter \u001b[38;5;241m=\u001b[39m ExcelFormatter(\n\u001b[1;32m 2407\u001b[0m df,\n\u001b[1;32m 2408\u001b[0m na_rep\u001b[38;5;241m=\u001b[39mna_rep,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 2415\u001b[0m inf_rep\u001b[38;5;241m=\u001b[39minf_rep,\n\u001b[1;32m 2416\u001b[0m )\n\u001b[0;32m-> 2417\u001b[0m \u001b[43mformatter\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mwrite\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 2418\u001b[0m \u001b[43m \u001b[49m\u001b[43mexcel_writer\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 2419\u001b[0m \u001b[43m \u001b[49m\u001b[43msheet_name\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43msheet_name\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 2420\u001b[0m \u001b[43m \u001b[49m\u001b[43mstartrow\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mstartrow\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 2421\u001b[0m \u001b[43m \u001b[49m\u001b[43mstartcol\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mstartcol\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 2422\u001b[0m \u001b[43m \u001b[49m\u001b[43mfreeze_panes\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mfreeze_panes\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 2423\u001b[0m \u001b[43m \u001b[49m\u001b[43mengine\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mengine\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 2424\u001b[0m \u001b[43m \u001b[49m\u001b[43mstorage_options\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mstorage_options\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 2425\u001b[0m \u001b[43m \u001b[49m\u001b[43mengine_kwargs\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mengine_kwargs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 2426\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n",
|
663 |
+
"File \u001b[0;32m~/miniforge3/envs/macros_evolution_space/lib/python3.12/site-packages/pandas/io/formats/excel.py:931\u001b[0m, in \u001b[0;36mExcelFormatter.write\u001b[0;34m(self, writer, sheet_name, startrow, startcol, freeze_panes, engine, storage_options, engine_kwargs)\u001b[0m\n\u001b[1;32m 929\u001b[0m num_rows, num_cols \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdf\u001b[38;5;241m.\u001b[39mshape\n\u001b[1;32m 930\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m num_rows \u001b[38;5;241m>\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmax_rows \u001b[38;5;129;01mor\u001b[39;00m num_cols \u001b[38;5;241m>\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmax_cols:\n\u001b[0;32m--> 931\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\n\u001b[1;32m 932\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mThis sheet is too large! Your sheet size is: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mnum_rows\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m, \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mnum_cols\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 933\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mMax sheet size is: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00m\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmax_rows\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m, \u001b[39m\u001b[38;5;132;01m{\u001b[39;00m\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmax_cols\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 934\u001b[0m )\n\u001b[1;32m 936\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m engine_kwargs \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 937\u001b[0m engine_kwargs \u001b[38;5;241m=\u001b[39m {}\n",
|
664 |
+
"\u001b[0;31mValueError\u001b[0m: This sheet is too large! Your sheet size is: 6350400, 8 Max sheet size is: 1048576, 16384"
|
665 |
+
]
|
666 |
+
}
|
667 |
+
],
|
668 |
+
"source": [
|
669 |
+
"# Creamos el ExcelWriter\n",
|
670 |
+
"writer = pd.ExcelWriter('opciones_macros.xlsx', engine='openpyxl')\n",
|
671 |
+
"\n",
|
672 |
+
"# Exportamos cada DataFrame a una hoja diferente\n",
|
673 |
+
"dataframe.to_excel(writer, sheet_name='Todas las combinaciones', index=False)\n",
|
674 |
+
"diferencias_peso_dataframe.to_excel(writer, sheet_name='Diferencias de peso', index=False)\n",
|
675 |
+
"objetivos_dataframe.to_excel(writer, sheet_name='Objetivos', index=False)\n",
|
676 |
+
"esfuerzos_dataframe.to_excel(writer, sheet_name='Esfuerzos', index=False)\n",
|
677 |
+
"cumplimiento_entrenamiento_dataframe.to_excel(writer, sheet_name='Cumplimiento entrenamiento', index=False)\n",
|
678 |
+
"cumplimiento_dieta_dataframe.to_excel(writer, sheet_name='Cumplimiento dieta', index=False)\n",
|
679 |
+
"compromiso_dataframe.to_excel(writer, sheet_name='Compromiso', index=False)\n",
|
680 |
+
"\n",
|
681 |
+
"# Guardamos y cerramos el archivo\n",
|
682 |
+
"writer.close()"
|
683 |
+
]
|
684 |
+
}
|
685 |
+
],
|
686 |
+
"metadata": {
|
687 |
+
"kernelspec": {
|
688 |
+
"display_name": "macros_evolution_space",
|
689 |
+
"language": "python",
|
690 |
+
"name": "python3"
|
691 |
+
},
|
692 |
+
"language_info": {
|
693 |
+
"codemirror_mode": {
|
694 |
+
"name": "ipython",
|
695 |
+
"version": 3
|
696 |
+
},
|
697 |
+
"file_extension": ".py",
|
698 |
+
"mimetype": "text/x-python",
|
699 |
+
"name": "python",
|
700 |
+
"nbconvert_exporter": "python",
|
701 |
+
"pygments_lexer": "ipython3",
|
702 |
+
"version": "3.12.8"
|
703 |
+
}
|
704 |
+
},
|
705 |
+
"nbformat": 4,
|
706 |
+
"nbformat_minor": 2
|
707 |
+
}
|