File size: 72,821 Bytes
b061450
 
 
 
 
 
 
 
 
 
 
 
8371b1d
b061450
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94ac910
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b061450
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94ac910
b061450
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94ac910
b061450
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94ac910
 
b061450
94ac910
 
 
 
 
 
 
b061450
 
 
 
94ac910
 
b061450
94ac910
 
b061450
94ac910
b061450
94ac910
b061450
 
94ac910
 
b061450
94ac910
 
 
 
 
 
8371b1d
b061450
 
 
 
94ac910
b061450
 
94ac910
 
b061450
 
 
94ac910
b061450
 
94ac910
 
b061450
94ac910
 
 
 
 
 
8371b1d
b061450
 
 
 
94ac910
 
b061450
94ac910
 
b061450
94ac910
b061450
94ac910
b061450
 
94ac910
 
b061450
94ac910
 
 
 
 
 
 
b061450
 
 
 
94ac910
b061450
 
94ac910
8371b1d
b061450
 
 
94ac910
b061450
 
94ac910
 
b061450
94ac910
 
 
 
 
 
8371b1d
b061450
 
 
 
94ac910
b061450
 
94ac910
8371b1d
b061450
 
 
94ac910
b061450
 
 
94ac910
b061450
 
 
 
94ac910
 
 
 
 
b061450
94ac910
 
 
 
 
b061450
 
94ac910
 
 
 
 
b061450
94ac910
 
 
 
 
b061450
94ac910
 
 
 
 
 
 
 
 
 
 
 
b061450
 
94ac910
 
 
 
 
b061450
94ac910
 
 
 
 
b061450
 
94ac910
 
 
 
 
b061450
94ac910
 
 
 
 
b061450
 
 
94ac910
b061450
94ac910
b061450
 
94ac910
 
 
 
 
b061450
 
94ac910
 
b061450
94ac910
b061450
 
94ac910
 
 
 
 
b061450
 
94ac910
 
 
 
 
b061450
94ac910
 
 
 
 
b061450
 
 
94ac910
 
 
 
b061450
94ac910
 
 
 
 
b061450
94ac910
 
 
 
 
 
 
 
 
 
 
 
b061450
94ac910
 
 
 
 
 
 
 
 
 
 
 
b061450
 
94ac910
 
b061450
 
 
 
94ac910
 
 
 
 
b061450
 
94ac910
 
 
 
 
b061450
94ac910
 
 
 
 
b061450
94ac910
b061450
 
8371b1d
b061450
 
 
 
 
 
 
 
8371b1d
 
 
b061450
 
 
 
 
 
 
 
 
 
 
 
 
8371b1d
b061450
 
 
8371b1d
b061450
 
 
8371b1d
b061450
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94ac910
 
b061450
94ac910
 
 
 
 
 
b061450
 
 
8371b1d
94ac910
 
b061450
94ac910
b061450
 
94ac910
 
b061450
94ac910
 
 
b061450
94ac910
 
b061450
 
 
 
94ac910
 
b061450
94ac910
b061450
 
94ac910
 
b061450
8371b1d
94ac910
 
 
 
 
b061450
 
8371b1d
94ac910
 
 
 
 
b061450
 
 
 
 
 
8371b1d
94ac910
 
 
b061450
8371b1d
94ac910
 
 
b061450
94ac910
 
 
 
b061450
8371b1d
94ac910
 
 
b061450
8371b1d
94ac910
 
 
b061450
8371b1d
94ac910
 
 
b061450
8371b1d
94ac910
 
 
b061450
8371b1d
94ac910
 
 
b061450
8371b1d
94ac910
 
 
b061450
 
8371b1d
b061450
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8371b1d
b061450
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94ac910
 
b061450
94ac910
 
 
 
 
 
b061450
 
 
8371b1d
 
94ac910
b061450
94ac910
 
 
 
 
 
 
 
 
b061450
 
94ac910
 
b061450
8371b1d
94ac910
 
 
 
 
b061450
 
 
8371b1d
 
 
 
 
 
 
 
 
 
 
 
 
b061450
94ac910
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b061450
 
 
 
 
 
94ac910
 
 
b061450
 
94ac910
 
 
b061450
8371b1d
94ac910
 
 
b061450
 
94ac910
 
 
b061450
 
94ac910
 
 
b061450
 
94ac910
 
 
b061450
 
94ac910
 
 
b061450
 
94ac910
 
 
b061450
 
94ac910
 
 
b061450
94ac910
 
 
 
b061450
94ac910
 
 
 
b061450
 
94ac910
 
 
b061450
 
94ac910
 
 
b061450
94ac910
 
 
 
b061450
8371b1d
94ac910
 
 
b061450
 
8371b1d
b061450
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8371b1d
b061450
 
 
 
 
 
94ac910
 
 
 
 
b061450
 
 
8371b1d
b061450
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8371b1d
b061450
 
 
 
 
 
94ac910
 
 
 
 
b061450
 
 
8371b1d
b061450
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8371b1d
b061450
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8371b1d
b061450
 
 
 
 
 
94ac910
 
 
 
 
b061450
 
 
8371b1d
b061450
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8371b1d
b061450
 
 
 
 
 
94ac910
 
 
 
 
b061450
 
 
8371b1d
b061450
 
 
 
 
 
 
 
 
 
 
 
8371b1d
b061450
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8371b1d
b061450
 
 
 
 
 
94ac910
 
 
 
 
b061450
 
 
8371b1d
b061450
 
 
 
 
 
 
 
 
 
 
 
8371b1d
b061450
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8371b1d
b061450
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8371b1d
b061450
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94ac910
 
 
b061450
 
 
 
94ac910
 
 
b061450
 
 
 
94ac910
 
 
b061450
8371b1d
b061450
 
94ac910
 
 
 
8371b1d
b061450
 
94ac910
 
 
b061450
94ac910
b061450
 
 
 
 
 
94ac910
 
 
 
 
 
b061450
94ac910
 
 
 
 
 
b061450
 
8371b1d
b061450
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8371b1d
b061450
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94ac910
 
b061450
94ac910
 
 
b061450
94ac910
 
b061450
 
8371b1d
94ac910
 
b061450
94ac910
 
 
 
 
 
 
 
 
 
 
 
 
b061450
 
 
 
94ac910
 
b061450
94ac910
 
 
b061450
94ac910
 
b061450
 
8371b1d
94ac910
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8371b1d
94ac910
8371b1d
 
 
94ac910
 
8371b1d
94ac910
 
 
8371b1d
94ac910
 
8371b1d
 
b061450
8371b1d
94ac910
8371b1d
b061450
94ac910
 
 
 
 
 
 
 
 
8371b1d
94ac910
 
 
b061450
 
 
94ac910
 
b061450
94ac910
 
 
 
 
 
b061450
 
 
8371b1d
94ac910
 
8371b1d
94ac910
 
 
 
 
 
 
 
 
 
 
b061450
94ac910
b061450
 
 
 
 
 
 
8371b1d
94ac910
 
 
 
b061450
8371b1d
94ac910
 
 
 
b061450
8371b1d
94ac910
 
 
 
b061450
8371b1d
94ac910
 
 
 
b061450
8371b1d
94ac910
 
 
 
b061450
8371b1d
94ac910
 
 
 
b061450
8371b1d
94ac910
 
 
 
b061450
8371b1d
94ac910
 
 
 
b061450
8371b1d
94ac910
 
 
 
b061450
8371b1d
94ac910
 
 
 
b061450
8371b1d
94ac910
 
 
 
b061450
8371b1d
94ac910
 
 
 
b061450
8371b1d
94ac910
 
 
 
b061450
94ac910
 
 
 
 
b061450
8371b1d
94ac910
 
 
 
b061450
94ac910
 
 
 
 
b061450
94ac910
 
 
 
 
 
 
 
 
 
 
b061450
 
8371b1d
b061450
 
 
 
 
 
 
 
 
 
8371b1d
94ac910
dc61d68
 
 
 
 
 
 
94ac910
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b061450
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94ac910
b061450
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "242ebc1d-2211-451d-ba0f-6508407f6b4f",
   "metadata": {},
   "source": [
    "# Preprocesamiento datos tramites.jsonl"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "62051ebd-2571-418d-9d1a-b2d50b100e57",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>estado</th>\n",
       "      <th>fechaActualización</th>\n",
       "      <th>nombre</th>\n",
       "      <th>slug</th>\n",
       "      <th>sigla</th>\n",
       "      <th>descripcion</th>\n",
       "      <th>marcoLegal</th>\n",
       "      <th>palabrasClave</th>\n",
       "      <th>like</th>\n",
       "      <th>dislike</th>\n",
       "      <th>esPresencial</th>\n",
       "      <th>esVirtual</th>\n",
       "      <th>entidad</th>\n",
       "      <th>resultado</th>\n",
       "      <th>enlaces</th>\n",
       "      <th>categorias</th>\n",
       "      <th>eventosVida</th>\n",
       "      <th>herramientas</th>\n",
       "      <th>documentos</th>\n",
       "      <th>modalidades</th>\n",
       "      <th>ubicaciones</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1002</td>\n",
       "      <td>PUBLICADO</td>\n",
       "      <td>22/10/2025</td>\n",
       "      <td>SOLICITUD DE COPIAS SIMPLES</td>\n",
       "      <td>solicitud-de-copias-simples</td>\n",
       "      <td>TCOP</td>\n",
       "      <td>Se refiere a la solicitud de copias simples de...</td>\n",
       "      <td>Resolución Nº RD 01-096-24 de 24/10/2024.</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>{'nombre': 'Aduana Nacional', 'sigla': 'AN', '...</td>\n",
       "      <td>Registro</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'nombre': 'Empresas', 'slug': 'empresas'}]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[COPIA SIMPLE DE DOCUMENTO DE IMPORTACIÓN O EX...</td>\n",
       "      <td>[{'tipo': 'VIRTUAL', 'url': 'https://jarembae....</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1003</td>\n",
       "      <td>PUBLICADO</td>\n",
       "      <td>22/10/2025</td>\n",
       "      <td>SOLICITUD DE LEGALIZACIONES Y/O AUTENTICACIONES</td>\n",
       "      <td>solicitud-de-legalizaciones-y-o-autenticaciones</td>\n",
       "      <td>TLEG</td>\n",
       "      <td>Se refiere a la solicitud de Legalización de d...</td>\n",
       "      <td>Resolución Nº RD 01-096-24 de 24/10/2024</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>{'nombre': 'Aduana Nacional', 'sigla': 'AN', '...</td>\n",
       "      <td>Registro</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'nombre': 'Empresas', 'slug': 'empresas'}]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[LEGALIZACIONES Y/O AUTENTICACIONES DE DOCUMEN...</td>\n",
       "      <td>[{'tipo': 'VIRTUAL', 'url': 'https://jarembae....</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1005</td>\n",
       "      <td>PUBLICADO</td>\n",
       "      <td>09/07/2025</td>\n",
       "      <td>Registro de Ciudadanos Digitales</td>\n",
       "      <td>registro-de-ciudadanos-digitales</td>\n",
       "      <td>None</td>\n",
       "      <td>Se brinda la colaboración personalizada a la c...</td>\n",
       "      <td>1. Ley N° 1173 - Ley de abreviación procesal p...</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>{'nombre': 'Tribunal Supremo de Justicia', 'si...</td>\n",
       "      <td></td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'nombre': 'Justicia', 'slug': 'justicia'}]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...</td>\n",
       "      <td>[{'nombre': 'Tribunal Supremo de Justicia', 't...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1006</td>\n",
       "      <td>PUBLICADO</td>\n",
       "      <td>09/09/2025</td>\n",
       "      <td>Registro en Ciudadanía Digital</td>\n",
       "      <td>registro-en-ciudadania-digital</td>\n",
       "      <td>CD</td>\n",
       "      <td>Ciudadanía Digital es la identidad digital de ...</td>\n",
       "      <td>Ley N° 1080 - Ciudadanía Digital</td>\n",
       "      <td>[digital, ciudadania, registro, pre registro, ...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>{'nombre': 'Agencia de Gobierno Electrónico y ...</td>\n",
       "      <td>Registro</td>\n",
       "      <td>[{'nombre': 'Ciudadania Digital', 'url': 'http...</td>\n",
       "      <td>[{'nombre': 'Seguridad', 'slug': 'seguridad'},...</td>\n",
       "      <td>[Empleo]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[Registro]</td>\n",
       "      <td>[{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...</td>\n",
       "      <td>[{'nombre': 'AGETIC', 'tipo': 'Oficina central...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1008</td>\n",
       "      <td>PUBLICADO</td>\n",
       "      <td>04/08/2025</td>\n",
       "      <td>RESOLUCIÓN DE RECURSO DE ALZADA</td>\n",
       "      <td>resolucion-de-recurso-de-alzada</td>\n",
       "      <td>None</td>\n",
       "      <td>Es el recurso que tiene el contribuyente o suj...</td>\n",
       "      <td>La Autoridad de Impugnación Tributaria (AIT), ...</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>{'nombre': 'Autoridad de Impugnación Tributari...</td>\n",
       "      <td></td>\n",
       "      <td>[{'nombre': 'Doctrina Tributaria', 'url': 'htt...</td>\n",
       "      <td>[{'nombre': 'Justicia', 'slug': 'justicia'}, {...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...</td>\n",
       "      <td>[{'nombre': 'Autoridad Regional de Impugnación...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1364</th>\n",
       "      <td>2867</td>\n",
       "      <td>PUBLICADO</td>\n",
       "      <td>24/10/2025</td>\n",
       "      <td>Actualización de Datos\\nConvalidación de estud...</td>\n",
       "      <td>actualizacion-de-datos-convalidacion-de-estudi...</td>\n",
       "      <td>None</td>\n",
       "      <td>El trámite consiste en presentar los certifica...</td>\n",
       "      <td>R.A. Departamental</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>{'nombre': 'Direc. Dptal. de Educación Potosí'...</td>\n",
       "      <td>Registro</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'nombre': 'Educación', 'slug': 'educacion'}]</td>\n",
       "      <td>[Mi educación]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[Resolución de convalidación y Diploma de Bach...</td>\n",
       "      <td>[{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...</td>\n",
       "      <td>[{'nombre': 'Subdirección de Educación Regular...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1365</th>\n",
       "      <td>2868</td>\n",
       "      <td>PUBLICADO</td>\n",
       "      <td>24/10/2025</td>\n",
       "      <td>TOPOGRAFÍA Y GEODESIA</td>\n",
       "      <td>topografia-y-geodesia</td>\n",
       "      <td>TG</td>\n",
       "      <td>El Área de Geodesia y Topografía brinda servic...</td>\n",
       "      <td>La Ley N° 535, en sus artículos 9, 10 y 71, es...</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>{'nombre': 'Servicio Geológico Minero', 'sigla...</td>\n",
       "      <td></td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'nombre': 'Transporte', 'slug': 'transporte'}]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...</td>\n",
       "      <td>[{'nombre': 'OFICINA CENTRAL DE SERGEOMIN', 't...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1366</th>\n",
       "      <td>2869</td>\n",
       "      <td>PUBLICADO</td>\n",
       "      <td>24/10/2025</td>\n",
       "      <td>Actualización de Datos\\nSolicitud de Anteceden...</td>\n",
       "      <td>actualizacion-de-datos-solicitud-de-antecedent...</td>\n",
       "      <td>None</td>\n",
       "      <td>El trámite consiste en presentar una carta de ...</td>\n",
       "      <td>R.A. Departamental</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>{'nombre': 'Direc. Dptal. de Educación Potosí'...</td>\n",
       "      <td>Registro</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'nombre': 'Educación', 'slug': 'educacion'}]</td>\n",
       "      <td>[Mi educación]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[Certificado o informe de antecedentes adminis...</td>\n",
       "      <td>[{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...</td>\n",
       "      <td>[{'nombre': 'Subdirección de Educación Regular...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1367</th>\n",
       "      <td>2870</td>\n",
       "      <td>PUBLICADO</td>\n",
       "      <td>24/10/2025</td>\n",
       "      <td>GEOFÍSICA</td>\n",
       "      <td>geofisica</td>\n",
       "      <td>AG</td>\n",
       "      <td>La geofísica aplicada es un área especializada...</td>\n",
       "      <td>La ley N°535 de 28 de mayo de 2014 – Ley de Mi...</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>{'nombre': 'Servicio Geológico Minero', 'sigla...</td>\n",
       "      <td></td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'nombre': 'Transporte', 'slug': 'transporte'}]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...</td>\n",
       "      <td>[{'nombre': 'OFICINA CENTRAL DE SERGEOMIN', 't...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1368</th>\n",
       "      <td>2871</td>\n",
       "      <td>PUBLICADO</td>\n",
       "      <td>24/10/2025</td>\n",
       "      <td>MEDIO AMBIENTE</td>\n",
       "      <td>medio-ambiente</td>\n",
       "      <td>UMA</td>\n",
       "      <td>El Área de Medio Ambiente se encarga de la ela...</td>\n",
       "      <td>El Área de Medio Ambiente se encarga de la ela...</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>{'nombre': 'Servicio Geológico Minero', 'sigla...</td>\n",
       "      <td></td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'nombre': 'Medio ambiente', 'slug': 'medio-a...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...</td>\n",
       "      <td>[{'nombre': 'OFICINA CENTRAL DE SERGEOMIN', 't...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1369 rows × 22 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        id     estado fechaActualización  \\\n",
       "0     1002  PUBLICADO         22/10/2025   \n",
       "1     1003  PUBLICADO         22/10/2025   \n",
       "2     1005  PUBLICADO         09/07/2025   \n",
       "3     1006  PUBLICADO         09/09/2025   \n",
       "4     1008  PUBLICADO         04/08/2025   \n",
       "...    ...        ...                ...   \n",
       "1364  2867  PUBLICADO         24/10/2025   \n",
       "1365  2868  PUBLICADO         24/10/2025   \n",
       "1366  2869  PUBLICADO         24/10/2025   \n",
       "1367  2870  PUBLICADO         24/10/2025   \n",
       "1368  2871  PUBLICADO         24/10/2025   \n",
       "\n",
       "                                                 nombre  \\\n",
       "0                           SOLICITUD DE COPIAS SIMPLES   \n",
       "1       SOLICITUD DE LEGALIZACIONES Y/O AUTENTICACIONES   \n",
       "2                      Registro de Ciudadanos Digitales   \n",
       "3                        Registro en Ciudadanía Digital   \n",
       "4                       RESOLUCIÓN DE RECURSO DE ALZADA   \n",
       "...                                                 ...   \n",
       "1364  Actualización de Datos\\nConvalidación de estud...   \n",
       "1365                              TOPOGRAFÍA Y GEODESIA   \n",
       "1366  Actualización de Datos\\nSolicitud de Anteceden...   \n",
       "1367                                          GEOFÍSICA   \n",
       "1368                                     MEDIO AMBIENTE   \n",
       "\n",
       "                                                   slug sigla  \\\n",
       "0                           solicitud-de-copias-simples  TCOP   \n",
       "1       solicitud-de-legalizaciones-y-o-autenticaciones  TLEG   \n",
       "2                      registro-de-ciudadanos-digitales  None   \n",
       "3                        registro-en-ciudadania-digital    CD   \n",
       "4                       resolucion-de-recurso-de-alzada  None   \n",
       "...                                                 ...   ...   \n",
       "1364  actualizacion-de-datos-convalidacion-de-estudi...  None   \n",
       "1365                              topografia-y-geodesia    TG   \n",
       "1366  actualizacion-de-datos-solicitud-de-antecedent...  None   \n",
       "1367                                          geofisica    AG   \n",
       "1368                                     medio-ambiente   UMA   \n",
       "\n",
       "                                            descripcion  \\\n",
       "0     Se refiere a la solicitud de copias simples de...   \n",
       "1     Se refiere a la solicitud de Legalización de d...   \n",
       "2     Se brinda la colaboración personalizada a la c...   \n",
       "3     Ciudadanía Digital es la identidad digital de ...   \n",
       "4     Es el recurso que tiene el contribuyente o suj...   \n",
       "...                                                 ...   \n",
       "1364  El trámite consiste en presentar los certifica...   \n",
       "1365  El Área de Geodesia y Topografía brinda servic...   \n",
       "1366  El trámite consiste en presentar una carta de ...   \n",
       "1367  La geofísica aplicada es un área especializada...   \n",
       "1368  El Área de Medio Ambiente se encarga de la ela...   \n",
       "\n",
       "                                             marcoLegal  \\\n",
       "0             Resolución Nº RD 01-096-24 de 24/10/2024.   \n",
       "1              Resolución Nº RD 01-096-24 de 24/10/2024   \n",
       "2     1. Ley N° 1173 - Ley de abreviación procesal p...   \n",
       "3                      Ley N° 1080 - Ciudadanía Digital   \n",
       "4     La Autoridad de Impugnación Tributaria (AIT), ...   \n",
       "...                                                 ...   \n",
       "1364                                 R.A. Departamental   \n",
       "1365  La Ley N° 535, en sus artículos 9, 10 y 71, es...   \n",
       "1366                                 R.A. Departamental   \n",
       "1367  La ley N°535 de 28 de mayo de 2014 – Ley de Mi...   \n",
       "1368  El Área de Medio Ambiente se encarga de la ela...   \n",
       "\n",
       "                                          palabrasClave  like  dislike  \\\n",
       "0                                                  None     0        0   \n",
       "1                                                  None     0        0   \n",
       "2                                                  None     0        0   \n",
       "3     [digital, ciudadania, registro, pre registro, ...     0        0   \n",
       "4                                                  None     0        0   \n",
       "...                                                 ...   ...      ...   \n",
       "1364                                               None     0        0   \n",
       "1365                                               None     0        0   \n",
       "1366                                               None     0        0   \n",
       "1367                                               None     0        0   \n",
       "1368                                               None     0        0   \n",
       "\n",
       "      esPresencial  esVirtual  \\\n",
       "0            False       True   \n",
       "1            False       True   \n",
       "2             True      False   \n",
       "3             True       True   \n",
       "4             True      False   \n",
       "...            ...        ...   \n",
       "1364          True      False   \n",
       "1365          True      False   \n",
       "1366          True      False   \n",
       "1367          True      False   \n",
       "1368          True      False   \n",
       "\n",
       "                                                entidad resultado  \\\n",
       "0     {'nombre': 'Aduana Nacional', 'sigla': 'AN', '...  Registro   \n",
       "1     {'nombre': 'Aduana Nacional', 'sigla': 'AN', '...  Registro   \n",
       "2     {'nombre': 'Tribunal Supremo de Justicia', 'si...             \n",
       "3     {'nombre': 'Agencia de Gobierno Electrónico y ...  Registro   \n",
       "4     {'nombre': 'Autoridad de Impugnación Tributari...             \n",
       "...                                                 ...       ...   \n",
       "1364  {'nombre': 'Direc. Dptal. de Educación Potosí'...  Registro   \n",
       "1365  {'nombre': 'Servicio Geológico Minero', 'sigla...             \n",
       "1366  {'nombre': 'Direc. Dptal. de Educación Potosí'...  Registro   \n",
       "1367  {'nombre': 'Servicio Geológico Minero', 'sigla...             \n",
       "1368  {'nombre': 'Servicio Geológico Minero', 'sigla...             \n",
       "\n",
       "                                                enlaces  \\\n",
       "0                                                    []   \n",
       "1                                                    []   \n",
       "2                                                    []   \n",
       "3     [{'nombre': 'Ciudadania Digital', 'url': 'http...   \n",
       "4     [{'nombre': 'Doctrina Tributaria', 'url': 'htt...   \n",
       "...                                                 ...   \n",
       "1364                                                 []   \n",
       "1365                                                 []   \n",
       "1366                                                 []   \n",
       "1367                                                 []   \n",
       "1368                                                 []   \n",
       "\n",
       "                                             categorias     eventosVida  \\\n",
       "0          [{'nombre': 'Empresas', 'slug': 'empresas'}]              []   \n",
       "1          [{'nombre': 'Empresas', 'slug': 'empresas'}]              []   \n",
       "2          [{'nombre': 'Justicia', 'slug': 'justicia'}]              []   \n",
       "3     [{'nombre': 'Seguridad', 'slug': 'seguridad'},...        [Empleo]   \n",
       "4     [{'nombre': 'Justicia', 'slug': 'justicia'}, {...              []   \n",
       "...                                                 ...             ...   \n",
       "1364     [{'nombre': 'Educación', 'slug': 'educacion'}]  [Mi educación]   \n",
       "1365   [{'nombre': 'Transporte', 'slug': 'transporte'}]              []   \n",
       "1366     [{'nombre': 'Educación', 'slug': 'educacion'}]  [Mi educación]   \n",
       "1367   [{'nombre': 'Transporte', 'slug': 'transporte'}]              []   \n",
       "1368  [{'nombre': 'Medio ambiente', 'slug': 'medio-a...              []   \n",
       "\n",
       "     herramientas                                         documentos  \\\n",
       "0              []  [COPIA SIMPLE DE DOCUMENTO DE IMPORTACIÓN O EX...   \n",
       "1              []  [LEGALIZACIONES Y/O AUTENTICACIONES DE DOCUMEN...   \n",
       "2              []                                                 []   \n",
       "3              []                                         [Registro]   \n",
       "4              []                                                 []   \n",
       "...           ...                                                ...   \n",
       "1364           []  [Resolución de convalidación y Diploma de Bach...   \n",
       "1365           []                                                 []   \n",
       "1366           []  [Certificado o informe de antecedentes adminis...   \n",
       "1367           []                                                 []   \n",
       "1368           []                                                 []   \n",
       "\n",
       "                                            modalidades  \\\n",
       "0     [{'tipo': 'VIRTUAL', 'url': 'https://jarembae....   \n",
       "1     [{'tipo': 'VIRTUAL', 'url': 'https://jarembae....   \n",
       "2     [{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...   \n",
       "3     [{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...   \n",
       "4     [{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...   \n",
       "...                                                 ...   \n",
       "1364  [{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...   \n",
       "1365  [{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...   \n",
       "1366  [{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...   \n",
       "1367  [{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...   \n",
       "1368  [{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...   \n",
       "\n",
       "                                            ubicaciones  \n",
       "0                                                    []  \n",
       "1                                                    []  \n",
       "2     [{'nombre': 'Tribunal Supremo de Justicia', 't...  \n",
       "3     [{'nombre': 'AGETIC', 'tipo': 'Oficina central...  \n",
       "4     [{'nombre': 'Autoridad Regional de Impugnación...  \n",
       "...                                                 ...  \n",
       "1364  [{'nombre': 'Subdirección de Educación Regular...  \n",
       "1365  [{'nombre': 'OFICINA CENTRAL DE SERGEOMIN', 't...  \n",
       "1366  [{'nombre': 'Subdirección de Educación Regular...  \n",
       "1367  [{'nombre': 'OFICINA CENTRAL DE SERGEOMIN', 't...  \n",
       "1368  [{'nombre': 'OFICINA CENTRAL DE SERGEOMIN', 't...  \n",
       "\n",
       "[1369 rows x 22 columns]"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import json\n",
    "import pandas as pd\n",
    "\n",
    "pd.set_option(\"display.max_columns\", None)\n",
    "pd.set_option(\"display.width\", None)\n",
    "\n",
    "# Obteniendo data frame pandas para explorar\n",
    "lines = []\n",
    "with open(r'../tramites.jsonl') as f:\n",
    "    lines = f.read().splitlines()\n",
    "\n",
    "line_dicts = [json.loads(line) for line in lines]\n",
    "df = pd.DataFrame(line_dicts)\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "febcb93a-ea52-4645-9e2c-25bc1cb80305",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "49eea40a-1fdb-48f1-b12d-6e27aff28725",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>estado</th>\n",
       "      <th>fechaActualización</th>\n",
       "      <th>nombre</th>\n",
       "      <th>slug</th>\n",
       "      <th>sigla</th>\n",
       "      <th>descripcion</th>\n",
       "      <th>marcoLegal</th>\n",
       "      <th>like</th>\n",
       "      <th>dislike</th>\n",
       "      <th>esPresencial</th>\n",
       "      <th>esVirtual</th>\n",
       "      <th>resultado</th>\n",
       "      <th>enlaces</th>\n",
       "      <th>modalidades</th>\n",
       "      <th>ubicaciones</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>858</th>\n",
       "      <td>2087</td>\n",
       "      <td>PUBLICADO</td>\n",
       "      <td>10/07/2025</td>\n",
       "      <td>Apertura de Unidades Educativas Privadas de Co...</td>\n",
       "      <td>apertura-de-unidades-educativas-privadas-de-co...</td>\n",
       "      <td>SER</td>\n",
       "      <td>Apertura de Unidades Educativas Privadas de Co...</td>\n",
       "      <td>Resolución Administrativa Departamental DDE-BE...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>Constancia</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...</td>\n",
       "      <td>[{'nombre': 'DIRECCION DEPARTAMENTAL DEL BENI'...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1130</th>\n",
       "      <td>2425</td>\n",
       "      <td>PUBLICADO</td>\n",
       "      <td>04/08/2025</td>\n",
       "      <td>CREACIÓN, MODIFICACIÓN O AMPLIACIÓN DE RUTAS Y...</td>\n",
       "      <td>creacion-modificacion-o-ampliacion-de-rutas-y-...</td>\n",
       "      <td>None</td>\n",
       "      <td>Solicitudes de creación, modificación o amplia...</td>\n",
       "      <td>Ley Nº 2341 de 23 de abril de 2002, de Procedi...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>Constancia</td>\n",
       "      <td>[{'nombre': 'GAMLP', 'url': 'https://lapaz.bo/...</td>\n",
       "      <td>[{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...</td>\n",
       "      <td>[{'nombre': 'Plataforma de Atención Ciudadana ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>476</th>\n",
       "      <td>1560</td>\n",
       "      <td>PUBLICADO</td>\n",
       "      <td>10/07/2025</td>\n",
       "      <td>DIPLOMA ACADEMICO - APOSTILLA</td>\n",
       "      <td>diploma-academico-apostilla</td>\n",
       "      <td>None</td>\n",
       "      <td>Trámite de apostilla dirigido a profesionales ...</td>\n",
       "      <td>Verificación de Originalidad</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>Registro y constancia</td>\n",
       "      <td>[{'nombre': 'Archivos', 'url': 'https://www.ar...</td>\n",
       "      <td>[{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...</td>\n",
       "      <td>[{'nombre': 'Archivos', 'tipo': 'Oficina centr...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        id     estado fechaActualización  \\\n",
       "858   2087  PUBLICADO         10/07/2025   \n",
       "1130  2425  PUBLICADO         04/08/2025   \n",
       "476   1560  PUBLICADO         10/07/2025   \n",
       "\n",
       "                                                 nombre  \\\n",
       "858   Apertura de Unidades Educativas Privadas de Co...   \n",
       "1130  CREACIÓN, MODIFICACIÓN O AMPLIACIÓN DE RUTAS Y...   \n",
       "476                       DIPLOMA ACADEMICO - APOSTILLA   \n",
       "\n",
       "                                                   slug sigla  \\\n",
       "858   apertura-de-unidades-educativas-privadas-de-co...   SER   \n",
       "1130  creacion-modificacion-o-ampliacion-de-rutas-y-...  None   \n",
       "476                         diploma-academico-apostilla  None   \n",
       "\n",
       "                                            descripcion  \\\n",
       "858   Apertura de Unidades Educativas Privadas de Co...   \n",
       "1130  Solicitudes de creación, modificación o amplia...   \n",
       "476   Trámite de apostilla dirigido a profesionales ...   \n",
       "\n",
       "                                             marcoLegal  like  dislike  \\\n",
       "858   Resolución Administrativa Departamental DDE-BE...     0        0   \n",
       "1130  Ley Nº 2341 de 23 de abril de 2002, de Procedi...     0        0   \n",
       "476                        Verificación de Originalidad     0        0   \n",
       "\n",
       "      esPresencial  esVirtual              resultado  \\\n",
       "858           True      False             Constancia   \n",
       "1130          True      False             Constancia   \n",
       "476           True      False  Registro y constancia   \n",
       "\n",
       "                                                enlaces  \\\n",
       "858                                                  []   \n",
       "1130  [{'nombre': 'GAMLP', 'url': 'https://lapaz.bo/...   \n",
       "476   [{'nombre': 'Archivos', 'url': 'https://www.ar...   \n",
       "\n",
       "                                            modalidades  \\\n",
       "858   [{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...   \n",
       "1130  [{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...   \n",
       "476   [{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...   \n",
       "\n",
       "                                            ubicaciones  \n",
       "858   [{'nombre': 'DIRECCION DEPARTAMENTAL DEL BENI'...  \n",
       "1130  [{'nombre': 'Plataforma de Atención Ciudadana ...  \n",
       "476   [{'nombre': 'Archivos', 'tipo': 'Oficina centr...  "
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# columnas pendientes:\n",
    "pendientes = ['palabrasClave', 'entidad', 'categorias', 'eventosVida',\n",
    "              'herramientas', 'documentos',\n",
    "             ]\n",
    "\n",
    "new_df = df[[col for col in df.columns if col not in pendientes]].copy()\n",
    "new_df.sample(3)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "eb94399f-67fb-4b45-9080-10b34d631beb",
   "metadata": {},
   "source": [
    "## Desglosando columnas\n",
    "\n",
    "### entidad"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "b89721ce-f7b0-4e7f-8cae-60019c50f438",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>estado</th>\n",
       "      <th>fechaActualización</th>\n",
       "      <th>nombre</th>\n",
       "      <th>slug</th>\n",
       "      <th>sigla</th>\n",
       "      <th>descripcion</th>\n",
       "      <th>marcoLegal</th>\n",
       "      <th>like</th>\n",
       "      <th>dislike</th>\n",
       "      <th>esPresencial</th>\n",
       "      <th>esVirtual</th>\n",
       "      <th>resultado</th>\n",
       "      <th>enlaces</th>\n",
       "      <th>modalidades</th>\n",
       "      <th>ubicaciones</th>\n",
       "      <th>entidad.nombre</th>\n",
       "      <th>entidad.sigla</th>\n",
       "      <th>entidad.slug</th>\n",
       "      <th>entidad.logo</th>\n",
       "      <th>entidad.descripcion</th>\n",
       "      <th>entidad.urlSitioWeb</th>\n",
       "      <th>entidad.telefonoContacto</th>\n",
       "      <th>entidad.correoElectronicoContacto</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1211</th>\n",
       "      <td>2509</td>\n",
       "      <td>PUBLICADO</td>\n",
       "      <td>29/08/2025</td>\n",
       "      <td>Certificado de Despacho Aduanero</td>\n",
       "      <td>certificado-de-despacho-aduanero</td>\n",
       "      <td>INSO-DA</td>\n",
       "      <td>Certificado de Despacho Aduanero es un proceso...</td>\n",
       "      <td>Decreto Supremo  N°  26119/01\\t Tuición y f...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>Registro y constancia</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...</td>\n",
       "      <td>[{'nombre': 'INSO-La Paz', 'tipo': 'Oficina ce...</td>\n",
       "      <td>Instituto Nacional de Salud Ocupacional</td>\n",
       "      <td>INSO</td>\n",
       "      <td>instituto-nacional-de-salud-ocupacional</td>\n",
       "      <td>https://www.gob.bo/ws/api/archivos/5933844f-a6...</td>\n",
       "      <td>El Instituto Nacional de Salud Ocupacional con...</td>\n",
       "      <td>https://www.inso.gob.bo/</td>\n",
       "      <td>2245414 - 2244881</td>\n",
       "      <td>inso@minsalud.gob.bo</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>184</th>\n",
       "      <td>1217</td>\n",
       "      <td>PUBLICADO</td>\n",
       "      <td>10/07/2025</td>\n",
       "      <td>Trámite 50 - Peticiones Escritas</td>\n",
       "      <td>tramite-50-peticiones-escritas</td>\n",
       "      <td>Trámite 50</td>\n",
       "      <td>Toda solicitud de información que presenten en...</td>\n",
       "      <td>Constitución Política del Estado Plurinacional...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>Registro</td>\n",
       "      <td>[{'nombre': 'Guía de Trámites', 'url': 'https:...</td>\n",
       "      <td>[{'tipo': 'VIRTUAL', 'url': 'https://tramites....</td>\n",
       "      <td>[{'nombre': 'Oficina Nacional', 'tipo': 'Ofici...</td>\n",
       "      <td>Servicio Plurinacional de Registro de Comercio</td>\n",
       "      <td>SEPREC</td>\n",
       "      <td>servicio-plurinacional-de-registro-de-comercio</td>\n",
       "      <td>https://www.gob.bo/ws/api/archivos/dec5dd8d-a6...</td>\n",
       "      <td>El Servicio Plurinacional de Registro de Comer...</td>\n",
       "      <td>https://www.seprec.gob.bo</td>\n",
       "      <td>800102992</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>568</th>\n",
       "      <td>1657</td>\n",
       "      <td>PUBLICADO</td>\n",
       "      <td>11/07/2025</td>\n",
       "      <td>Pago del Beneficio Fondo de Retiro Policial So...</td>\n",
       "      <td>pago-del-beneficio-fondo-de-retiro-policial-so...</td>\n",
       "      <td>FR-JUB</td>\n",
       "      <td>Es el beneficio que brinda protección a los mi...</td>\n",
       "      <td>a) Constitución Política del Estado Plurinacio...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td></td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...</td>\n",
       "      <td>[{'nombre': 'OFICINA CENTRAL LA PAZ', 'tipo': ...</td>\n",
       "      <td>Mutual de Servicios al Policía</td>\n",
       "      <td>MUSERPOL</td>\n",
       "      <td>mutual-de-servicios-al-policia</td>\n",
       "      <td>https://www.gob.bo/ws/api/archivos/1b0c8503-ed...</td>\n",
       "      <td>La Mutual de Servicios al Policía – MUSERPOL s...</td>\n",
       "      <td>https://www.muserpol.gob.bo</td>\n",
       "      <td>(2)2441186</td>\n",
       "      <td>info@muserpol.gob.bo</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        id     estado fechaActualización  \\\n",
       "1211  2509  PUBLICADO         29/08/2025   \n",
       "184   1217  PUBLICADO         10/07/2025   \n",
       "568   1657  PUBLICADO         11/07/2025   \n",
       "\n",
       "                                                 nombre  \\\n",
       "1211                   Certificado de Despacho Aduanero   \n",
       "184                    Trámite 50 - Peticiones Escritas   \n",
       "568   Pago del Beneficio Fondo de Retiro Policial So...   \n",
       "\n",
       "                                                   slug       sigla  \\\n",
       "1211                   certificado-de-despacho-aduanero     INSO-DA   \n",
       "184                      tramite-50-peticiones-escritas  Trámite 50   \n",
       "568   pago-del-beneficio-fondo-de-retiro-policial-so...      FR-JUB   \n",
       "\n",
       "                                            descripcion  \\\n",
       "1211  Certificado de Despacho Aduanero es un proceso...   \n",
       "184   Toda solicitud de información que presenten en...   \n",
       "568   Es el beneficio que brinda protección a los mi...   \n",
       "\n",
       "                                             marcoLegal  like  dislike  \\\n",
       "1211     Decreto Supremo  N°  26119/01\\t Tuición y f...     0        0   \n",
       "184   Constitución Política del Estado Plurinacional...     0        0   \n",
       "568   a) Constitución Política del Estado Plurinacio...     0        0   \n",
       "\n",
       "      esPresencial  esVirtual              resultado  \\\n",
       "1211          True      False  Registro y constancia   \n",
       "184          False       True               Registro   \n",
       "568           True      False                          \n",
       "\n",
       "                                                enlaces  \\\n",
       "1211                                                 []   \n",
       "184   [{'nombre': 'Guía de Trámites', 'url': 'https:...   \n",
       "568                                                  []   \n",
       "\n",
       "                                            modalidades  \\\n",
       "1211  [{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...   \n",
       "184   [{'tipo': 'VIRTUAL', 'url': 'https://tramites....   \n",
       "568   [{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...   \n",
       "\n",
       "                                            ubicaciones  \\\n",
       "1211  [{'nombre': 'INSO-La Paz', 'tipo': 'Oficina ce...   \n",
       "184   [{'nombre': 'Oficina Nacional', 'tipo': 'Ofici...   \n",
       "568   [{'nombre': 'OFICINA CENTRAL LA PAZ', 'tipo': ...   \n",
       "\n",
       "                                      entidad.nombre entidad.sigla  \\\n",
       "1211         Instituto Nacional de Salud Ocupacional          INSO   \n",
       "184   Servicio Plurinacional de Registro de Comercio        SEPREC   \n",
       "568                   Mutual de Servicios al Policía      MUSERPOL   \n",
       "\n",
       "                                        entidad.slug  \\\n",
       "1211         instituto-nacional-de-salud-ocupacional   \n",
       "184   servicio-plurinacional-de-registro-de-comercio   \n",
       "568                   mutual-de-servicios-al-policia   \n",
       "\n",
       "                                           entidad.logo  \\\n",
       "1211  https://www.gob.bo/ws/api/archivos/5933844f-a6...   \n",
       "184   https://www.gob.bo/ws/api/archivos/dec5dd8d-a6...   \n",
       "568   https://www.gob.bo/ws/api/archivos/1b0c8503-ed...   \n",
       "\n",
       "                                    entidad.descripcion  \\\n",
       "1211  El Instituto Nacional de Salud Ocupacional con...   \n",
       "184   El Servicio Plurinacional de Registro de Comer...   \n",
       "568   La Mutual de Servicios al Policía – MUSERPOL s...   \n",
       "\n",
       "              entidad.urlSitioWeb entidad.telefonoContacto  \\\n",
       "1211     https://www.inso.gob.bo/        2245414 - 2244881   \n",
       "184     https://www.seprec.gob.bo                800102992   \n",
       "568   https://www.muserpol.gob.bo               (2)2441186   \n",
       "\n",
       "     entidad.correoElectronicoContacto  \n",
       "1211              inso@minsalud.gob.bo  \n",
       "184                               None  \n",
       "568               info@muserpol.gob.bo  "
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# desglosando columnas de la entidad\n",
    "\n",
    "new_rows = {\n",
    "    'entidad.nombre': [],\n",
    "    'entidad.sigla': [],\n",
    "    'entidad.slug': [],\n",
    "    'entidad.logo': [],\n",
    "    'entidad.descripcion': [],\n",
    "    'entidad.urlSitioWeb': [],\n",
    "    'entidad.telefonoContacto': [],\n",
    "    'entidad.correoElectronicoContacto': [],\n",
    "}\n",
    "for i in range(0, df.shape[0]):\n",
    "    entidad_json = df.iloc[i]['entidad']\n",
    "    #entidad_json = json.loads(df.iloc[i]['entidad'])\n",
    "    new_rows['entidad.nombre'].append(entidad_json['nombre'])\n",
    "    new_rows['entidad.sigla'].append(entidad_json['sigla'])\n",
    "    new_rows['entidad.slug'].append(entidad_json['slug'])\n",
    "    new_rows['entidad.logo'].append(entidad_json['logo'])\n",
    "    new_rows['entidad.descripcion'].append(entidad_json['descripcion'])\n",
    "    new_rows['entidad.urlSitioWeb'].append(entidad_json['urlSitioWeb'])\n",
    "    new_rows['entidad.telefonoContacto'].append(entidad_json['telefonoContacto'])\n",
    "    new_rows['entidad.correoElectronicoContacto'].append(entidad_json['correoElectronicoContacto'])\n",
    "\n",
    "for k, v in new_rows.items():\n",
    "    new_df[k] = pd.Series(v).values\n",
    "\n",
    "new_df.sample(3)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "48f9eda7-5016-4f07-91fd-76cfc6ed1214",
   "metadata": {},
   "source": [
    "### esPresencial y esVirtual\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "3c9dfb8b-f6a7-4f75-82ab-5b7a973189d1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1067                                                   \n",
       "916                                                    \n",
       "148               Global,Notas,Certificado,Legalización\n",
       "190                    Certificación,Escolares,Libretas\n",
       "1054    inscripción vehículo,importación,casa comercial\n",
       "Name: palabrasClave, dtype: object"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rows = []\n",
    "for i in range(0, df.shape[0]):\n",
    "    palabras_clave = df.iloc[i]['palabrasClave']\n",
    "    if isinstance(palabras_clave, list):\n",
    "        rows.append(','.join(palabras_clave))\n",
    "    else:\n",
    "        rows.append('')\n",
    "\n",
    "new_df['palabrasClave'] = pd.Series(rows).values\n",
    "new_df.sample(5)['palabrasClave']"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "eafc4d9e-ac97-41fa-bf38-fb681128ca18",
   "metadata": {},
   "source": [
    "### categorias"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "b492f2b3-6bb7-4412-81a5-e2a0543ec7a8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "981    Educación,Salud,Vivienda,Empresas\n",
       "644                            Educación\n",
       "956                             Vivienda\n",
       "757            Justicia,Seguridad social\n",
       "751                            Educación\n",
       "Name: categorias, dtype: object"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rows = []\n",
    "for i in range(0, df.shape[0]):\n",
    "    categorias = df.iloc[i]['categorias']\n",
    "    categorias_list = [categoria['nombre'] for categoria in categorias]\n",
    "    if len(categorias_list) > 0:\n",
    "        rows.append(','.join(categorias_list))\n",
    "    else:\n",
    "        # TODO: ver como normalizar valores vacios, NULL o cadena vacia?\n",
    "        rows.append('')\n",
    "new_df['categorias'] = rows\n",
    "new_df.sample(5)['categorias']"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d8d7df89-dfa0-429c-ae5a-cbf578cfa2a1",
   "metadata": {},
   "source": [
    "### eventosVida"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "2ec66e9d-4154-4a30-a8d5-4a6d52ba7709",
   "metadata": {},
   "outputs": [],
   "source": [
    "def separar_lista_por_caracter(df, col, separator=','):\n",
    "    rows = []\n",
    "    for i in range(0, df.shape[0]):\n",
    "        words = df.iloc[i][col]\n",
    "        if isinstance(words, list):\n",
    "            rows.append(separator.join(words))\n",
    "        else:\n",
    "            rows.append('')\n",
    "    return rows"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "0f891bad-d8bd-4e7f-a82a-da559b223fae",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "91                 \n",
       "429    Mi educación\n",
       "715    Mi educación\n",
       "851    Mi educación\n",
       "603      Jubilación\n",
       "Name: eventosVida, dtype: object"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rows = separar_lista_por_caracter(df, 'eventosVida')\n",
    "new_df['eventosVida'] = pd.Series(rows).values\n",
    "new_df.sample(5)['eventosVida']"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "06217a9b-7bba-4c02-99be-b6f426276595",
   "metadata": {},
   "source": [
    "### documentos"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "b3c23fd8-a417-471d-9a76-3b7323ecd096",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1312                                                     \n",
       "486                                Formulario de registro\n",
       "1126                           Emisión de certificaciones\n",
       "679                    Titulo y Resolución Administrativa\n",
       "279     Concentrado de Notas Histórico Académico Récor...\n",
       "Name: documentos, dtype: object"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rows = separar_lista_por_caracter(df, 'documentos')\n",
    "new_df['documentos'] = pd.Series(rows).values\n",
    "new_df.sample(5)['documentos']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "ae3d172e-46b4-4bd7-9182-fd032b4c4df6",
   "metadata": {},
   "outputs": [],
   "source": [
    "new_df['enlaces'] = df['enlaces']"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8720df45-89fd-42b5-8483-8d6dca7287e9",
   "metadata": {},
   "source": [
    "### herramientas"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "20472e60-f3a0-4a09-aeba-6e4d9b27ec05",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1050    \n",
       "500     \n",
       "1089    \n",
       "1317    \n",
       "1203    \n",
       "Name: herramientas, dtype: object"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rows = separar_lista_por_caracter(df, 'herramientas')\n",
    "new_df['herramientas'] = pd.Series(rows).values\n",
    "new_df.sample(5)['herramientas']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "40b8b76e-be7b-4199-81af-4fbe6cb98f86",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "id                                   object\n",
       "estado                               object\n",
       "fechaActualización                   object\n",
       "nombre                               object\n",
       "slug                                 object\n",
       "sigla                                object\n",
       "descripcion                          object\n",
       "marcoLegal                           object\n",
       "like                                  int64\n",
       "dislike                               int64\n",
       "esPresencial                           bool\n",
       "esVirtual                              bool\n",
       "resultado                            object\n",
       "enlaces                              object\n",
       "modalidades                          object\n",
       "ubicaciones                          object\n",
       "entidad.nombre                       object\n",
       "entidad.sigla                        object\n",
       "entidad.slug                         object\n",
       "entidad.logo                         object\n",
       "entidad.descripcion                  object\n",
       "entidad.urlSitioWeb                  object\n",
       "entidad.telefonoContacto             object\n",
       "entidad.correoElectronicoContacto    object\n",
       "palabrasClave                        object\n",
       "categorias                           object\n",
       "eventosVida                          object\n",
       "documentos                           object\n",
       "herramientas                         object\n",
       "dtype: object"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "new_df.dtypes"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7a240370-0091-4fa1-96aa-36ee136624fa",
   "metadata": {},
   "source": [
    "### esPresencial"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "30e194e4-58cf-449e-bdff-fd39e725f152",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>nombre</th>\n",
       "      <th>esPresencial</th>\n",
       "      <th>esVirtual</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>275</th>\n",
       "      <td>1313</td>\n",
       "      <td>Atención A Reclamos De Clientes</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>767</th>\n",
       "      <td>1973</td>\n",
       "      <td>LEGALIZACION DE POLIZA DE INTERNACION</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>401</th>\n",
       "      <td>1450</td>\n",
       "      <td>Título Profesional de Maestro(a)</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>89</th>\n",
       "      <td>1114</td>\n",
       "      <td>Legalización de Título Profesional - Técnico S...</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>54</th>\n",
       "      <td>1062</td>\n",
       "      <td>INSPECCIÓN DE CILINDROS DE HIERRO O ACERO SOME...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       id                                             nombre  esPresencial  \\\n",
       "275  1313                    Atención A Reclamos De Clientes             1   \n",
       "767  1973              LEGALIZACION DE POLIZA DE INTERNACION             1   \n",
       "401  1450                   Título Profesional de Maestro(a)             1   \n",
       "89   1114  Legalización de Título Profesional - Técnico S...             1   \n",
       "54   1062  INSPECCIÓN DE CILINDROS DE HIERRO O ACERO SOME...             1   \n",
       "\n",
       "     esVirtual  \n",
       "275          0  \n",
       "767          0  \n",
       "401          0  \n",
       "89           1  \n",
       "54           0  "
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "new_df['esPresencial'] = new_df['esPresencial'].apply(lambda value: 1 if value is True else 0)\n",
    "new_df['esVirtual'] = new_df['esVirtual'].apply(lambda value: 1 if value is True else 0)\n",
    "new_df.sample(5)[['id', 'nombre', 'esPresencial', 'esVirtual']]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8984fbe6-024b-44a2-b796-2ab3a976981b",
   "metadata": {},
   "source": [
    "## Guardado como csv"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "947a2928-535c-4510-8dec-eeb36ebc87c0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>estado</th>\n",
       "      <th>fechaActualización</th>\n",
       "      <th>nombre</th>\n",
       "      <th>slug</th>\n",
       "      <th>sigla</th>\n",
       "      <th>descripcion</th>\n",
       "      <th>marcoLegal</th>\n",
       "      <th>like</th>\n",
       "      <th>dislike</th>\n",
       "      <th>esPresencial</th>\n",
       "      <th>esVirtual</th>\n",
       "      <th>resultado</th>\n",
       "      <th>enlaces</th>\n",
       "      <th>modalidades</th>\n",
       "      <th>ubicaciones</th>\n",
       "      <th>entidad.nombre</th>\n",
       "      <th>entidad.sigla</th>\n",
       "      <th>entidad.slug</th>\n",
       "      <th>entidad.logo</th>\n",
       "      <th>entidad.descripcion</th>\n",
       "      <th>entidad.urlSitioWeb</th>\n",
       "      <th>entidad.telefonoContacto</th>\n",
       "      <th>entidad.correoElectronicoContacto</th>\n",
       "      <th>palabrasClave</th>\n",
       "      <th>categorias</th>\n",
       "      <th>eventosVida</th>\n",
       "      <th>documentos</th>\n",
       "      <th>herramientas</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>488</th>\n",
       "      <td>1572</td>\n",
       "      <td>PUBLICADO</td>\n",
       "      <td>13/07/2025</td>\n",
       "      <td>Devolución de Aportes Derechohabientes</td>\n",
       "      <td>devolucion-de-aportes-derechohabientes</td>\n",
       "      <td>None</td>\n",
       "      <td>Derechohabientes de Funcionarios Policiales fa...</td>\n",
       "      <td>Reglamento para la Devolución de Aportes VERSI...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...</td>\n",
       "      <td>[{'nombre': 'Consejo Nacional de Vivienda Poli...</td>\n",
       "      <td>Consejo Nacional de Vivienda Policial</td>\n",
       "      <td>COVIPOL</td>\n",
       "      <td>consejo-nacional-de-vivienda-policial</td>\n",
       "      <td>https://www.gob.bo/ws/api/archivos/24ca848f-d1...</td>\n",
       "      <td>El Consejo Nacional de Vivienda Policial (COVI...</td>\n",
       "      <td>https://covipol.gob.bo</td>\n",
       "      <td>73288511</td>\n",
       "      <td>achavez@covipol.gob.bo</td>\n",
       "      <td></td>\n",
       "      <td>Vivienda</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47</th>\n",
       "      <td>1055</td>\n",
       "      <td>PUBLICADO</td>\n",
       "      <td>23/07/2025</td>\n",
       "      <td>VERIFICACIÓN Y RESERVA DE DENOMINACIÓN</td>\n",
       "      <td>verificacion-y-reserva-de-denominacion</td>\n",
       "      <td>None</td>\n",
       "      <td>Regular el procedimiento de solicitud, verific...</td>\n",
       "      <td>Ley N°356 y Decreto Supremo N°1995</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>Registro y constancia</td>\n",
       "      <td>[{'nombre': 'SITCOOP', 'url': 'https://coopera...</td>\n",
       "      <td>[{'tipo': 'VIRTUAL', 'url': 'https://cooperati...</td>\n",
       "      <td>[{'nombre': 'Central', 'tipo': 'Oficina centra...</td>\n",
       "      <td>Autoridad de Fiscalización y Control de Cooper...</td>\n",
       "      <td>AFCOOP</td>\n",
       "      <td>autoridad-de-fiscalizacion-y-control-de-cooper...</td>\n",
       "      <td>https://www.gob.bo/ws/api/archivos/2bf12663-3f...</td>\n",
       "      <td>“Regular, Controlar, Fiscalizar y Supervisar e...</td>\n",
       "      <td>https://www.afcoop.gob.bo/</td>\n",
       "      <td>2 129205</td>\n",
       "      <td>None</td>\n",
       "      <td>reserva,denominacion,afcoop,nombre,cooperativa</td>\n",
       "      <td>Identificación</td>\n",
       "      <td></td>\n",
       "      <td>VERIFICACIÓN Y RESERVA DE DENOMINACIÓN</td>\n",
       "      <td></td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>531</th>\n",
       "      <td>1617</td>\n",
       "      <td>PUBLICADO</td>\n",
       "      <td>30/07/2025</td>\n",
       "      <td>REQUISITOS PARA AFILIACION DEL EMPLEADOR EMPRE...</td>\n",
       "      <td>requisitos-para-afiliacion-del-empleador-empre...</td>\n",
       "      <td>None</td>\n",
       "      <td>REQUISITOS PARA AFILIACION DEL EMPLEADOR EMPRE...</td>\n",
       "      <td>REQUISITOS PARA AFILIACION DEL EMPLEADOR EMPRE...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>Constancia</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...</td>\n",
       "      <td>[{'nombre': 'CNS REGIONAL LA PAZ', 'tipo': 'Re...</td>\n",
       "      <td>Caja Nacional de Salud</td>\n",
       "      <td>CNS</td>\n",
       "      <td>caja-nacional-de-salud</td>\n",
       "      <td>https://www.gob.bo/ws/api/archivos/8c891d9b-56...</td>\n",
       "      <td>La Caja Nacional de Salud es una institución d...</td>\n",
       "      <td>https://www.cns.gob.bo</td>\n",
       "      <td>2112064</td>\n",
       "      <td>None</td>\n",
       "      <td></td>\n",
       "      <td>Salud</td>\n",
       "      <td>Cuidado de salud</td>\n",
       "      <td>REQUISITOS PARA AFILIACION DEL EMPLEADOR EMPRE...</td>\n",
       "      <td></td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1357</th>\n",
       "      <td>2852</td>\n",
       "      <td>PUBLICADO</td>\n",
       "      <td>15/10/2025</td>\n",
       "      <td>LLENADO Y LEGALIZADO DE CERTIFICADOS DE CALIFI...</td>\n",
       "      <td>llenado-y-legalizado-de-certificados-de-califi...</td>\n",
       "      <td>013</td>\n",
       "      <td>Trámite que permite al estudiante que realizó ...</td>\n",
       "      <td>Aprobación de la Actualización de la Guía de T...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>Constancia</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...</td>\n",
       "      <td>[{'nombre': 'Dirección Departamental de Educac...</td>\n",
       "      <td>Direc. Dptal. de Educación La Paz</td>\n",
       "      <td>DDE-LPZ</td>\n",
       "      <td>direc-dptal-de-educacion-la-paz</td>\n",
       "      <td>https://www.gob.bo/ws/api/archivos/1a6cd44a-f5...</td>\n",
       "      <td>La Educación en Bolivia, ha sufrido una serie ...</td>\n",
       "      <td>https://www.ddelapaz.gob.bo</td>\n",
       "      <td>65125555</td>\n",
       "      <td>jronald.es.cruz@gmail.com</td>\n",
       "      <td></td>\n",
       "      <td>Educación</td>\n",
       "      <td></td>\n",
       "      <td>LLENADO Y LEGALIZADO DE CERTIFICADOS DE CALIFI...</td>\n",
       "      <td></td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        id     estado fechaActualización  \\\n",
       "488   1572  PUBLICADO         13/07/2025   \n",
       "47    1055  PUBLICADO         23/07/2025   \n",
       "531   1617  PUBLICADO         30/07/2025   \n",
       "1357  2852  PUBLICADO         15/10/2025   \n",
       "\n",
       "                                                 nombre  \\\n",
       "488              Devolución de Aportes Derechohabientes   \n",
       "47               VERIFICACIÓN Y RESERVA DE DENOMINACIÓN   \n",
       "531   REQUISITOS PARA AFILIACION DEL EMPLEADOR EMPRE...   \n",
       "1357  LLENADO Y LEGALIZADO DE CERTIFICADOS DE CALIFI...   \n",
       "\n",
       "                                                   slug sigla  \\\n",
       "488              devolucion-de-aportes-derechohabientes  None   \n",
       "47               verificacion-y-reserva-de-denominacion  None   \n",
       "531   requisitos-para-afiliacion-del-empleador-empre...  None   \n",
       "1357  llenado-y-legalizado-de-certificados-de-califi...   013   \n",
       "\n",
       "                                            descripcion  \\\n",
       "488   Derechohabientes de Funcionarios Policiales fa...   \n",
       "47    Regular el procedimiento de solicitud, verific...   \n",
       "531   REQUISITOS PARA AFILIACION DEL EMPLEADOR EMPRE...   \n",
       "1357  Trámite que permite al estudiante que realizó ...   \n",
       "\n",
       "                                             marcoLegal  like  dislike  \\\n",
       "488   Reglamento para la Devolución de Aportes VERSI...     0        0   \n",
       "47                   Ley N°356 y Decreto Supremo N°1995     0        0   \n",
       "531   REQUISITOS PARA AFILIACION DEL EMPLEADOR EMPRE...     0        0   \n",
       "1357  Aprobación de la Actualización de la Guía de T...     0        0   \n",
       "\n",
       "      esPresencial  esVirtual              resultado  \\\n",
       "488              1          0                          \n",
       "47               0          1  Registro y constancia   \n",
       "531              1          0             Constancia   \n",
       "1357             1          0             Constancia   \n",
       "\n",
       "                                                enlaces  \\\n",
       "488                                                  []   \n",
       "47    [{'nombre': 'SITCOOP', 'url': 'https://coopera...   \n",
       "531                                                  []   \n",
       "1357                                                 []   \n",
       "\n",
       "                                            modalidades  \\\n",
       "488   [{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...   \n",
       "47    [{'tipo': 'VIRTUAL', 'url': 'https://cooperati...   \n",
       "531   [{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...   \n",
       "1357  [{'tipo': 'PRESENCIAL', 'url': None, 'urlSegui...   \n",
       "\n",
       "                                            ubicaciones  \\\n",
       "488   [{'nombre': 'Consejo Nacional de Vivienda Poli...   \n",
       "47    [{'nombre': 'Central', 'tipo': 'Oficina centra...   \n",
       "531   [{'nombre': 'CNS REGIONAL LA PAZ', 'tipo': 'Re...   \n",
       "1357  [{'nombre': 'Dirección Departamental de Educac...   \n",
       "\n",
       "                                         entidad.nombre entidad.sigla  \\\n",
       "488               Consejo Nacional de Vivienda Policial       COVIPOL   \n",
       "47    Autoridad de Fiscalización y Control de Cooper...        AFCOOP   \n",
       "531                              Caja Nacional de Salud           CNS   \n",
       "1357                  Direc. Dptal. de Educación La Paz       DDE-LPZ   \n",
       "\n",
       "                                           entidad.slug  \\\n",
       "488               consejo-nacional-de-vivienda-policial   \n",
       "47    autoridad-de-fiscalizacion-y-control-de-cooper...   \n",
       "531                              caja-nacional-de-salud   \n",
       "1357                    direc-dptal-de-educacion-la-paz   \n",
       "\n",
       "                                           entidad.logo  \\\n",
       "488   https://www.gob.bo/ws/api/archivos/24ca848f-d1...   \n",
       "47    https://www.gob.bo/ws/api/archivos/2bf12663-3f...   \n",
       "531   https://www.gob.bo/ws/api/archivos/8c891d9b-56...   \n",
       "1357  https://www.gob.bo/ws/api/archivos/1a6cd44a-f5...   \n",
       "\n",
       "                                    entidad.descripcion  \\\n",
       "488   El Consejo Nacional de Vivienda Policial (COVI...   \n",
       "47    “Regular, Controlar, Fiscalizar y Supervisar e...   \n",
       "531   La Caja Nacional de Salud es una institución d...   \n",
       "1357  La Educación en Bolivia, ha sufrido una serie ...   \n",
       "\n",
       "              entidad.urlSitioWeb entidad.telefonoContacto  \\\n",
       "488        https://covipol.gob.bo                 73288511   \n",
       "47     https://www.afcoop.gob.bo/                 2 129205   \n",
       "531        https://www.cns.gob.bo                  2112064   \n",
       "1357  https://www.ddelapaz.gob.bo                 65125555   \n",
       "\n",
       "     entidad.correoElectronicoContacto  \\\n",
       "488             achavez@covipol.gob.bo   \n",
       "47                                None   \n",
       "531                               None   \n",
       "1357         jronald.es.cruz@gmail.com   \n",
       "\n",
       "                                       palabrasClave      categorias  \\\n",
       "488                                                         Vivienda   \n",
       "47    reserva,denominacion,afcoop,nombre,cooperativa  Identificación   \n",
       "531                                                            Salud   \n",
       "1357                                                       Educación   \n",
       "\n",
       "           eventosVida                                         documentos  \\\n",
       "488                                                                         \n",
       "47                                 VERIFICACIÓN Y RESERVA DE DENOMINACIÓN   \n",
       "531   Cuidado de salud  REQUISITOS PARA AFILIACION DEL EMPLEADOR EMPRE...   \n",
       "1357                    LLENADO Y LEGALIZADO DE CERTIFICADOS DE CALIFI...   \n",
       "\n",
       "     herramientas  \n",
       "488                \n",
       "47                 \n",
       "531                \n",
       "1357               "
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "new_df.sample(4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "2ad4c72a-ead5-47ac-8124-a6ab73189793",
   "metadata": {
    "editable": true,
    "slideshow": {
     "slide_type": ""
    },
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(1369, 22)\n",
      "(1369, 29)\n"
     ]
    }
   ],
   "source": [
    "print(df.shape)\n",
    "print(new_df.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "f6e08f6b-0314-4b8f-9deb-a5d7db5b0c1d",
   "metadata": {},
   "outputs": [],
   "source": [
    "new_df.to_csv('../tramites.csv', index=False)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}