summaryrefslogtreecommitdiffstats
path: root/2023-2/L04/mitsuo/simple.ipynb
blob: 1e90256ce3f0998c9ebcfbaeaeff0178caf623d9 (plain)
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
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "# pd.set_option('display.max_rows', None)\n",
    "pd.set_option('display.max_columns', None)\n",
    "pd.set_option('display.expand_frame_repr', False)\n",
    "pd.set_option('display.float_format', '{:,.2f}'.format)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "productos = pd.read_csv(\"../Productos2.csv\", names=(\"product_id\", \"product_name\", \"price\", \"uses_credit\"), encoding='latin1')\n",
    "clientes = pd.read_csv(\"../Clientes2.csv\", names=(\"client_id\", \"client_name\", \"phonenumber\", \"credit\"))\n",
    "pedidos = pd.read_csv(\"../Pedidos2.csv\", names=(\"product_id\", \"client_id\", \"qty\"))\n",
    "\n",
    "clientes = clientes.set_index('client_id')\n",
    "productos = productos.set_index('product_id')\n",
    "# pedidos['date'] = pd.to_datetime(pedidos['date'], format=\"%d/%m/%Y\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "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>product_name</th>\n",
       "      <th>price</th>\n",
       "      <th>uses_credit</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>product_id</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>BIT-434</th>\n",
       "      <td>Campana Extractora modelo Glass</td>\n",
       "      <td>375.09</td>\n",
       "      <td>S</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>SSE-115</th>\n",
       "      <td>Refrigeradora  CoolStyle 311N Steel</td>\n",
       "      <td>3,243.58</td>\n",
       "      <td>S</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>NMV-644</th>\n",
       "      <td>Lavadora Automatica</td>\n",
       "      <td>3,272.48</td>\n",
       "      <td>S</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>MLE-193</th>\n",
       "      <td>Cocina a gas Ingenious</td>\n",
       "      <td>2,779.41</td>\n",
       "      <td>S</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>YYK-309</th>\n",
       "      <td>Refrigeradora Door in Door</td>\n",
       "      <td>4,079.44</td>\n",
       "      <td>S</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                   product_name    price uses_credit\n",
       "product_id                                                          \n",
       "BIT-434         Campana Extractora modelo Glass   375.09           S\n",
       "SSE-115     Refrigeradora  CoolStyle 311N Steel 3,243.58           S\n",
       "NMV-644                     Lavadora Automatica 3,272.48           S\n",
       "MLE-193                  Cocina a gas Ingenious 2,779.41           S\n",
       "YYK-309              Refrigeradora Door in Door 4,079.44           S"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "productos.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "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>client_name</th>\n",
       "      <th>phonenumber</th>\n",
       "      <th>credit</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>client_id</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>79464412</th>\n",
       "      <td>PORTUGAL RAFFO ALEXANDER</td>\n",
       "      <td>3902394</td>\n",
       "      <td>10000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16552775</th>\n",
       "      <td>YALLICO PAREDES LOURDES CARMELA</td>\n",
       "      <td>960176666</td>\n",
       "      <td>20000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20864087</th>\n",
       "      <td>ZEGARRA CASANOVA ESTEFANIA</td>\n",
       "      <td>2639311</td>\n",
       "      <td>10000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>94326707</th>\n",
       "      <td>CHANG SEGURA ANGEL</td>\n",
       "      <td>984185862</td>\n",
       "      <td>10000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>73786035</th>\n",
       "      <td>ORTIZ EPIQUEN HENRY ISRAEL</td>\n",
       "      <td>6873908</td>\n",
       "      <td>20000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                               client_name  phonenumber  credit\n",
       "client_id                                                      \n",
       "79464412          PORTUGAL RAFFO ALEXANDER      3902394   10000\n",
       "16552775   YALLICO PAREDES LOURDES CARMELA    960176666   20000\n",
       "20864087        ZEGARRA CASANOVA ESTEFANIA      2639311   10000\n",
       "94326707                CHANG SEGURA ANGEL    984185862   10000\n",
       "73786035        ORTIZ EPIQUEN HENRY ISRAEL      6873908   20000"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "clientes.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "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>product_id</th>\n",
       "      <th>client_id</th>\n",
       "      <th>qty</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>JXD-139</td>\n",
       "      <td>50375303</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>CRU-009</td>\n",
       "      <td>50375303</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>YYK-309</td>\n",
       "      <td>22777006</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>OTS-581</td>\n",
       "      <td>42157219</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>AWB-345</td>\n",
       "      <td>13245501</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  product_id  client_id  qty\n",
       "0    JXD-139   50375303    6\n",
       "1    CRU-009   50375303    5\n",
       "2    YYK-309   22777006    3\n",
       "3    OTS-581   42157219    5\n",
       "4    AWB-345   13245501    1"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pedidos.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "# reduce stock from products as orders come\n",
    "\n",
    "pedidos['served'] = False\n",
    "for i, pedido in pedidos.iterrows():\n",
    "    cid = pedido['client_id']\n",
    "    pid = pedido['product_id']\n",
    "    qty = pedido['qty']\n",
    "    credit = clientes.loc[cid, 'credit']\n",
    "    price = productos.loc[pid, 'price']\n",
    "    uses_credit = productos.loc[pid, 'uses_credit']\n",
    "    total_cost = qty * price\n",
    "    if uses_credit == 'S' and credit >= total_cost:\n",
    "        clientes.loc[cid, 'credit'] -= total_cost\n",
    "        pedidos.loc[i, 'served'] = True\n",
    "        "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "========================================================================================================================\n",
      "client_id                      79464412\n",
      "client_name    PORTUGAL RAFFO ALEXANDER\n",
      "phonenumber                     3902394\n",
      "credit                         5,782.30\n",
      "Name: 0, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    NSM-283    2 1,873.62\n",
      "1    JXD-139    4 2,344.08\n",
      "========================================================================================================================\n",
      "client_id                             16552775\n",
      "client_name    YALLICO PAREDES LOURDES CARMELA\n",
      "phonenumber                          960176666\n",
      "credit                                3,716.33\n",
      "Name: 1, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty     total\n",
      "0    AWB-345    6  4,802.22\n",
      "1    CNN-411    5 11,481.45\n",
      "========================================================================================================================\n",
      "client_id                        20864087\n",
      "client_name    ZEGARRA CASANOVA ESTEFANIA\n",
      "phonenumber                       2639311\n",
      "credit                             258.47\n",
      "Name: 2, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    JFC-432    1   307.67\n",
      "1    JDQ-505    6 9,433.86\n",
      "========================================================================================================================\n",
      "client_id                94326707\n",
      "client_name    CHANG SEGURA ANGEL\n",
      "phonenumber             984185862\n",
      "credit                  10,000.00\n",
      "Name: 3, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "Empty DataFrame\n",
      "Columns: [product_id, qty, total]\n",
      "Index: []\n",
      "========================================================================================================================\n",
      "client_id                        73786035\n",
      "client_name    ORTIZ EPIQUEN HENRY ISRAEL\n",
      "phonenumber                       6873908\n",
      "credit                          17,750.16\n",
      "Name: 4, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    DEN-125    4 2,249.84\n",
      "========================================================================================================================\n",
      "client_id                          31193794\n",
      "client_name    GARCIA YINO AMERICO WALDEMAR\n",
      "phonenumber                       986742314\n",
      "credit                             5,000.00\n",
      "Name: 5, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "Empty DataFrame\n",
      "Columns: [product_id, qty, total]\n",
      "Index: []\n",
      "========================================================================================================================\n",
      "client_id                    96659352\n",
      "client_name    BRAVO VIZCARRA ROBERTO\n",
      "phonenumber                 985707065\n",
      "credit                       4,099.88\n",
      "Name: 6, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    ADX-669    4 4,957.52\n",
      "1    GBJ-693    3   942.60\n",
      "========================================================================================================================\n",
      "client_id                              57690875\n",
      "client_name    NORABUENA VILLEGAS ARTURO RAFAEL\n",
      "phonenumber                           889013091\n",
      "credit                                 2,232.17\n",
      "Name: 7, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    CSZ-863    5 8,567.85\n",
      "1    CIM-038    3 7,633.92\n",
      "2    XTE-383    6 1,566.06\n",
      "========================================================================================================================\n",
      "client_id                            69975105\n",
      "client_name    VALDERRAMA MENDOZA LUIS ADOLFO\n",
      "phonenumber                         977523461\n",
      "credit                               2,717.26\n",
      "Name: 8, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    WZD-331    6 7,282.74\n",
      "========================================================================================================================\n",
      "client_id                         54761731\n",
      "client_name    LOYOLA IBEROS ANGEL GUSTAVO\n",
      "phonenumber                      951334343\n",
      "credit                              291.26\n",
      "Name: 9, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty     total\n",
      "0    DEV-433    3  8,096.22\n",
      "1    ZVA-180    4 11,612.52\n",
      "========================================================================================================================\n",
      "client_id                   67418025\n",
      "client_name    MOSCOSO SUELDO MARINA\n",
      "phonenumber                  7663823\n",
      "credit                      4,063.06\n",
      "Name: 10, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    QUU-384    1 2,545.54\n",
      "1    FEG-454    2 3,391.40\n",
      "========================================================================================================================\n",
      "client_id                         77642521\n",
      "client_name    SORIA CASTILLO LUIS GUSTAVO\n",
      "phonenumber                      952902679\n",
      "credit                            5,736.66\n",
      "Name: 11, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty     total\n",
      "0    QUU-384    5 12,727.70\n",
      "1    YYU-726    2  1,535.64\n",
      "========================================================================================================================\n",
      "client_id                          35584593\n",
      "client_name    LAM VIZCARDO MILAGROS YVONNE\n",
      "phonenumber                         6294058\n",
      "credit                             5,724.64\n",
      "Name: 12, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty     total\n",
      "0    SSD-176    4  2,270.84\n",
      "1    AVM-258    4 11,324.92\n",
      "2    KCO-488    1    679.60\n",
      "========================================================================================================================\n",
      "client_id                              43053402\n",
      "client_name    BENAVENTE ZIMIC MADELEINE ZKENIA\n",
      "phonenumber                           917252545\n",
      "credit                                 2,633.12\n",
      "Name: 13, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    YOT-530    2 1,883.46\n",
      "1    VRR-793    2   483.42\n",
      "========================================================================================================================\n",
      "client_id                    84165595\n",
      "client_name    SALAMANCA GAVIDIA ALEX\n",
      "phonenumber                 963178009\n",
      "credit                         304.52\n",
      "Name: 14, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    DFJ-952    1 3,342.77\n",
      "1    RDT-761    6 5,429.70\n",
      "2    JFC-432    3   923.01\n",
      "========================================================================================================================\n",
      "client_id                    89298238\n",
      "client_name    ALFARO PRECIADO JOHNNY\n",
      "phonenumber                 996727505\n",
      "credit                         319.74\n",
      "Name: 15, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    PFD-286    2 5,552.04\n",
      "1    QFP-254    2   361.30\n",
      "2    YOT-530    4 3,766.92\n",
      "========================================================================================================================\n",
      "client_id                                     71984468\n",
      "client_name    IPARRAGUIRRE VILLEGAS NICOLAS EDILBERTO\n",
      "phonenumber                                  935441620\n",
      "credit                                        7,570.49\n",
      "Name: 16, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    PQH-935    2   188.90\n",
      "1    JJN-837    5 9,899.60\n",
      "2    TZY-323    1 2,341.01\n",
      "========================================================================================================================\n",
      "client_id                     29847168\n",
      "client_name    ALDAVE ZEVALLOS ROSARIO\n",
      "phonenumber                    6261108\n",
      "credit                        5,000.00\n",
      "Name: 17, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "Empty DataFrame\n",
      "Columns: [product_id, qty, total]\n",
      "Index: []\n",
      "========================================================================================================================\n",
      "client_id                    79475585\n",
      "client_name    RETTO ARCA ANNIE MAGDA\n",
      "phonenumber                 941241092\n",
      "credit                       4,568.30\n",
      "Name: 18, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    BWD-036    5 5,431.70\n",
      "========================================================================================================================\n",
      "client_id                      91897732\n",
      "client_name    GAMARRA ALCOCER VIRGINIA\n",
      "phonenumber                   954025615\n",
      "credit                           348.72\n",
      "Name: 19, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty     total\n",
      "0    TMN-884    2    621.30\n",
      "1    XZR-640    5 11,952.90\n",
      "2    WLL-607    1  1,525.04\n",
      "3    PFD-286    2  5,552.04\n",
      "========================================================================================================================\n",
      "client_id                                33397650\n",
      "client_name    RONDON EGUSQUIZA CARMELA VALENTINA\n",
      "phonenumber                               3911397\n",
      "credit                                   2,430.88\n",
      "Name: 20, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    IHG-413    3   953.10\n",
      "1    VJI-529    6 6,616.02\n",
      "========================================================================================================================\n",
      "client_id                           83236386\n",
      "client_name    RIVERO CORRALES JUAN FERNANDO\n",
      "phonenumber                        946513105\n",
      "credit                              4,516.64\n",
      "Name: 21, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    MTF-868    2 1,943.18\n",
      "1    OPT-996    2 2,734.96\n",
      "2    OFS-384    1   805.22\n",
      "========================================================================================================================\n",
      "client_id                            32821689\n",
      "client_name    ZAVALETA EPIQUEN CARMEN ZKENIA\n",
      "phonenumber                         955248211\n",
      "credit                               3,181.04\n",
      "Name: 22, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    ONB-903    3 1,961.01\n",
      "1    MTF-868    5 4,857.95\n",
      "========================================================================================================================\n",
      "client_id                   45783712\n",
      "client_name    POZO CHUNG RAFAEL DEL\n",
      "phonenumber                  8252118\n",
      "credit                      1,219.48\n",
      "Name: 23, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    YUQ-590    2 3,958.14\n",
      "1    QFR-958    3 4,822.38\n",
      "========================================================================================================================\n",
      "client_id                    48184351\n",
      "client_name    LOPEZ JAUREGUI ROLANDO\n",
      "phonenumber                 884716679\n",
      "credit                      13,091.21\n",
      "Name: 24, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    KQA-580    2 5,815.84\n",
      "1    TXM-139    1 1,092.95\n",
      "========================================================================================================================\n",
      "client_id                            33713901\n",
      "client_name    VILLEGAS CASTRO SOFIA VIRGINIA\n",
      "phonenumber                           2339560\n",
      "credit                               7,617.22\n",
      "Name: 25, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    UWA-476    2 2,382.78\n",
      "========================================================================================================================\n",
      "client_id                  76388967\n",
      "client_name    GONZALES QUIO ISABEL\n",
      "phonenumber                 8094909\n",
      "credit                    10,000.00\n",
      "Name: 26, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "Empty DataFrame\n",
      "Columns: [product_id, qty, total]\n",
      "Index: []\n",
      "========================================================================================================================\n",
      "client_id                       81114108\n",
      "client_name    ZAMBRANO SHIRAKAWA WILMER\n",
      "phonenumber                      5853087\n",
      "credit                            431.70\n",
      "Name: 27, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    VRR-793    4   966.84\n",
      "1    RBE-789    2 6,606.14\n",
      "2    DFF-034    5 1,296.25\n",
      "3    VCL-867    1   699.07\n",
      "========================================================================================================================\n",
      "client_id                          57263719\n",
      "client_name    PRADO TORREALBA CARMEN JANET\n",
      "phonenumber                       988736554\n",
      "credit                               678.90\n",
      "Name: 28, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    BWD-036    3 3,259.02\n",
      "1    OTH-462    2 1,062.08\n",
      "========================================================================================================================\n",
      "client_id                            79140840\n",
      "client_name    TORREALBA ARCA VICTORIA GLENDA\n",
      "phonenumber                         876488179\n",
      "credit                               4,354.41\n",
      "Name: 29, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    DFF-034    3   777.75\n",
      "1    HLR-109    1   439.47\n",
      "2    OTH-462    1   531.04\n",
      "3    TMN-884    5 1,553.25\n",
      "4    JXD-139    4 2,344.08\n",
      "========================================================================================================================\n",
      "client_id                      71378466\n",
      "client_name    MIYAKE CARO HENRRY EDGAR\n",
      "phonenumber                   921051207\n",
      "credit                         5,472.12\n",
      "Name: 30, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    BIT-434    4 1,500.36\n",
      "1    FVQ-662    2 2,121.36\n",
      "2    OQI-373    1   906.16\n",
      "========================================================================================================================\n",
      "client_id                          17913944\n",
      "client_name    PALOMARES SANTISTEBAN HENRRY\n",
      "phonenumber                       967944433\n",
      "credit                             3,166.74\n",
      "Name: 31, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    IHG-413    4 1,270.80\n",
      "1    DEN-125    1   562.46\n",
      "========================================================================================================================\n",
      "client_id                         62566305\n",
      "client_name    ROMERO ALFARO MONICA JOHANA\n",
      "phonenumber                        8206363\n",
      "credit                               54.77\n",
      "Name: 32, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    DIQ-718    4 1,563.20\n",
      "1    GXF-122    5 5,550.80\n",
      "2    AVM-258    1 2,831.23\n",
      "========================================================================================================================\n",
      "client_id                          46462527\n",
      "client_name    LOYOLA MORI NICOLAS FERNANDO\n",
      "phonenumber                         5865695\n",
      "credit                             2,281.60\n",
      "Name: 33, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    KCO-488    4 2,718.40\n",
      "========================================================================================================================\n",
      "client_id               79420973\n",
      "client_name    AURIS JOLAY DIANA\n",
      "phonenumber              7073267\n",
      "credit                  1,669.52\n",
      "Name: 34, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    GXF-122    3 3,330.48\n",
      "========================================================================================================================\n",
      "client_id                      22777006\n",
      "client_name    ASMAD PINTO MARIA LORENA\n",
      "phonenumber                   939918070\n",
      "credit                         1,135.05\n",
      "Name: 35, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    FCN-617    1 4,121.05\n",
      "1    XLF-273    2 4,743.90\n",
      "========================================================================================================================\n",
      "client_id                  43877279\n",
      "client_name    RARAZ SUCHERO ADOLFO\n",
      "phonenumber                 4105386\n",
      "credit                     2,729.16\n",
      "Name: 36, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    SSD-176    4 2,270.84\n",
      "========================================================================================================================\n",
      "client_id                        73535476\n",
      "client_name    AYALA SANCHEZ MARIA TERESA\n",
      "phonenumber                     892714088\n",
      "credit                           1,590.29\n",
      "Name: 37, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    UWA-476    5 5,956.95\n",
      "1    KJX-387    4 2,452.76\n",
      "========================================================================================================================\n",
      "client_id                   26976877\n",
      "client_name    TORO CUBA DIALY DIANA\n",
      "phonenumber                  2748661\n",
      "credit                      3,297.23\n",
      "Name: 38, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    VTV-269    4 3,417.92\n",
      "1    JXD-139    2 1,172.04\n",
      "2    XZG-521    3 2,112.81\n",
      "========================================================================================================================\n",
      "client_id                      78078115\n",
      "client_name    TSUKAZAN AMEZQUITA DELIA\n",
      "phonenumber                   905818632\n",
      "credit                         3,913.79\n",
      "Name: 39, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty  total\n",
      "0    DFF-034    2 518.50\n",
      "1    SSD-176    1 567.71\n",
      "========================================================================================================================\n",
      "client_id                            48467976\n",
      "client_name    BENITES SANCHEZ MARGOT DELICIA\n",
      "phonenumber                           4888316\n",
      "credit                               5,000.00\n",
      "Name: 40, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "Empty DataFrame\n",
      "Columns: [product_id, qty, total]\n",
      "Index: []\n",
      "========================================================================================================================\n",
      "client_id                        41036366\n",
      "client_name    JUSTINO LOYOLA JENNY MAGDA\n",
      "phonenumber                       5939760\n",
      "credit                           5,000.00\n",
      "Name: 41, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "Empty DataFrame\n",
      "Columns: [product_id, qty, total]\n",
      "Index: []\n",
      "========================================================================================================================\n",
      "client_id                    31611146\n",
      "client_name    LANDEO LARRIEGA MARTIN\n",
      "phonenumber                   8566657\n",
      "credit                       1,990.36\n",
      "Name: 42, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    YOT-530    4 3,766.92\n",
      "1    FVQ-662    4 4,242.72\n",
      "========================================================================================================================\n",
      "client_id                           64394265\n",
      "client_name    SALAZAR GONZALES DAVID RAFAEL\n",
      "phonenumber                        938884629\n",
      "credit                                973.90\n",
      "Name: 43, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    OFS-384    5 4,026.10\n",
      "========================================================================================================================\n",
      "client_id                           50365593\n",
      "client_name    SUAREZ BRAVO MARIELLA TATIANA\n",
      "phonenumber                        965004473\n",
      "credit                              1,675.15\n",
      "Name: 44, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    AFL-718    5 8,324.85\n",
      "========================================================================================================================\n",
      "client_id                      95751208\n",
      "client_name    CORONEL ZEGARRA FIORELLA\n",
      "phonenumber                   925608637\n",
      "credit                         1,684.24\n",
      "Name: 45, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    UOD-420    4 3,315.76\n",
      "========================================================================================================================\n",
      "client_id                          79372768\n",
      "client_name    BERROCAL YALLICO ANNIE SOFIA\n",
      "phonenumber                       897157366\n",
      "credit                             5,515.86\n",
      "Name: 46, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    GLC-370    4 2,208.96\n",
      "1    SAM-013    1 2,275.18\n",
      "========================================================================================================================\n",
      "client_id                         27912250\n",
      "client_name    CUBA CHUNG ISRAEL EDILBERTO\n",
      "phonenumber                        2489481\n",
      "credit                            3,271.63\n",
      "Name: 47, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    ICX-503    1 1,221.02\n",
      "1    LWG-915    4 4,405.88\n",
      "2    LWG-915    1 1,101.47\n",
      "========================================================================================================================\n",
      "client_id                   60574154\n",
      "client_name    LOZADA GONZALES JAIME\n",
      "phonenumber                962838234\n",
      "credit                      4,239.12\n",
      "Name: 48, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    BWD-036    2 2,172.68\n",
      "1    III-576    6 6,465.90\n",
      "2    KDA-627    5 7,122.30\n",
      "========================================================================================================================\n",
      "client_id                     35565959\n",
      "client_name    VILCARA RODRIGUEZ ANNIE\n",
      "phonenumber                    7272527\n",
      "credit                        1,912.13\n",
      "Name: 49, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    BZS-261    1 3,087.87\n",
      "========================================================================================================================\n",
      "client_id                               80048864\n",
      "client_name    JUSTINO CASTILLO SANDRO CHRISTIAN\n",
      "phonenumber                            929077160\n",
      "credit                                    475.25\n",
      "Name: 50, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    RDT-761    5 4,524.75\n",
      "========================================================================================================================\n",
      "client_id                     96258632\n",
      "client_name    FLORENCIO GARCIA WALTER\n",
      "phonenumber                  993338854\n",
      "credit                          873.98\n",
      "Name: 51, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    CRU-009    2 5,311.56\n",
      "1    QHC-492    2 3,814.46\n",
      "========================================================================================================================\n",
      "client_id                  94080926\n",
      "client_name    SORIA CRUZ MADELEINE\n",
      "phonenumber                 6726720\n",
      "credit                     2,513.50\n",
      "Name: 52, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    TXM-139    5 5,464.75\n",
      "1    SPR-580    5 2,021.75\n",
      "========================================================================================================================\n",
      "client_id                42157219\n",
      "client_name    LUNA CUEVA RICHARD\n",
      "phonenumber               6465719\n",
      "credit                   3,640.80\n",
      "Name: 53, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    KCO-488    2 1,359.20\n",
      "========================================================================================================================\n",
      "client_id                          86241107\n",
      "client_name    SANCHEZ EPIQUEN EDGAR MELVIN\n",
      "phonenumber                         3096849\n",
      "credit                             3,040.90\n",
      "Name: 54, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    CIM-038    2 5,089.28\n",
      "1    UXG-019    2 1,869.82\n",
      "========================================================================================================================\n",
      "client_id                              26290971\n",
      "client_name    SANTISTEBAN AYALA CAROLA MARITZA\n",
      "phonenumber                           988835189\n",
      "credit                                 4,070.69\n",
      "Name: 55, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty  total\n",
      "0    PVZ-181    3 929.31\n",
      "========================================================================================================================\n",
      "client_id                             22280452\n",
      "client_name    GONZALES MALDONADO ZKENIA ERIKA\n",
      "phonenumber                            5066321\n",
      "credit                                4,271.59\n",
      "Name: 56, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    XSD-310    2 4,519.86\n",
      "1    VRR-793    5 1,208.55\n",
      "========================================================================================================================\n",
      "client_id                          90365520\n",
      "client_name    PALOMINO ADAMS SANDRO RONALD\n",
      "phonenumber                       964902408\n",
      "credit                               248.20\n",
      "Name: 57, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    KWP-672    6 9,751.80\n",
      "========================================================================================================================\n",
      "client_id                     40348917\n",
      "client_name    VEGA TSUKAZAN VALENTINA\n",
      "phonenumber                  962692699\n",
      "credit                        4,697.18\n",
      "Name: 58, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    WZD-331    3 3,641.37\n",
      "1    BMJ-772    1   936.32\n",
      "2    VRR-793    3   725.13\n",
      "========================================================================================================================\n",
      "client_id                95161027\n",
      "client_name    FALCON POZO WALTER\n",
      "phonenumber             907875771\n",
      "credit                   1,888.50\n",
      "Name: 59, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    VJI-529    2 2,205.34\n",
      "1    OQI-373    1   906.16\n",
      "========================================================================================================================\n",
      "client_id                   77191257\n",
      "client_name    CORRALES ZUNIGA JENNY\n",
      "phonenumber                  6329003\n",
      "credit                      3,236.20\n",
      "Name: 60, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    QVJ-982    5 6,763.80\n",
      "========================================================================================================================\n",
      "client_id                           62324793\n",
      "client_name    GAVIDIA MORENO ISRAEL ROLANDO\n",
      "phonenumber                        979240911\n",
      "credit                              2,298.13\n",
      "Name: 61, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    LDR-510    1 2,701.87\n",
      "========================================================================================================================\n",
      "client_id                       16151792\n",
      "client_name    DURAND CASTRO FLOR MARTHA\n",
      "phonenumber                      8008929\n",
      "credit                          2,669.01\n",
      "Name: 62, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    WZD-331    3 3,641.37\n",
      "1    CNQ-172    1 3,689.62\n",
      "========================================================================================================================\n",
      "client_id                   66409237\n",
      "client_name    CANO DELGADO WILLIAMS\n",
      "phonenumber                969142116\n",
      "credit                      1,379.10\n",
      "Name: 63, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    DFF-034    4 1,037.00\n",
      "1    BRD-969    3 7,739.16\n",
      "2    UXG-019    4 3,739.64\n",
      "3    ICX-503    5 6,105.10\n",
      "========================================================================================================================\n",
      "client_id                           63437380\n",
      "client_name    PINTO CABELLO SILVIA FELICITA\n",
      "phonenumber                          8343056\n",
      "credit                              1,410.27\n",
      "Name: 64, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    III-576    5 5,388.25\n",
      "1    AWB-345    4 3,201.48\n",
      "========================================================================================================================\n",
      "client_id                95015539\n",
      "client_name    CHANG SAONA RONALD\n",
      "phonenumber             974180726\n",
      "credit                   6,572.86\n",
      "Name: 65, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    CSZ-863    2 3,427.14\n",
      "========================================================================================================================\n",
      "client_id                     25171011\n",
      "client_name    CRUZ JUGO SANDRO FAUSTO\n",
      "phonenumber                  982755508\n",
      "credit                          555.93\n",
      "Name: 66, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    VCL-867    3 2,097.21\n",
      "1    AWB-345    6 4,802.22\n",
      "2    CIM-038    1 2,544.64\n",
      "========================================================================================================================\n",
      "client_id                           90237332\n",
      "client_name    ESPINOZA CASTRO YDALI GIOVANA\n",
      "phonenumber                          8119710\n",
      "credit                              5,796.32\n",
      "Name: 67, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    QFP-254    3   541.95\n",
      "1    PVZ-181    5 1,548.85\n",
      "2    OQI-373    1   906.16\n",
      "3    TKM-141    3 1,206.72\n",
      "========================================================================================================================\n",
      "client_id                            87800799\n",
      "client_name    QUIROGA SALAZAR JOHNNY ROBERTO\n",
      "phonenumber                           8105714\n",
      "credit                               1,396.36\n",
      "Name: 68, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    KWP-672    2 3,250.60\n",
      "1    VRR-793    2   483.42\n",
      "2    WZD-331    2 2,427.58\n",
      "3    ICX-503    2 2,442.04\n",
      "========================================================================================================================\n",
      "client_id                         38637282\n",
      "client_name    TABORI CARBAJAL YDALI MAGDA\n",
      "phonenumber                      914898726\n",
      "credit                            9,194.78\n",
      "Name: 69, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty  total\n",
      "0    OFS-384    1 805.22\n",
      "========================================================================================================================\n",
      "client_id                    15561764\n",
      "client_name    VILLEGAS CASTRO ALONSO\n",
      "phonenumber                   4983446\n",
      "credit                       7,140.66\n",
      "Name: 70, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    GBJ-693    2   628.40\n",
      "1    JYQ-045    6 1,602.90\n",
      "2    RAH-420    4   628.04\n",
      "========================================================================================================================\n",
      "client_id                45877001\n",
      "client_name    SORIA VILLA HENRRY\n",
      "phonenumber             876812206\n",
      "credit                   3,904.25\n",
      "Name: 71, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    GBJ-693    5 1,571.00\n",
      "1    RDT-761    5 4,524.75\n",
      "========================================================================================================================\n",
      "client_id                   87813843\n",
      "client_name    AYALA ACUNA RONY ALEX\n",
      "phonenumber                967252992\n",
      "credit                      2,314.05\n",
      "Name: 72, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    XSD-310    3 6,779.79\n",
      "1    OQI-373    1   906.16\n",
      "========================================================================================================================\n",
      "client_id                78757121\n",
      "client_name    ASTETE SOLIS FANNY\n",
      "phonenumber             881829766\n",
      "credit                   1,171.36\n",
      "Name: 73, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    OQI-373    3 2,718.48\n",
      "1    GXF-122    1 1,110.16\n",
      "========================================================================================================================\n",
      "client_id                       53166028\n",
      "client_name    CANO CHUNG EMILIO NICOLAS\n",
      "phonenumber                    935212007\n",
      "credit                          2,852.91\n",
      "Name: 74, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    QHC-492    1 1,907.23\n",
      "1    ONB-903    3 1,961.01\n",
      "2    TXM-139    3 3,278.85\n",
      "========================================================================================================================\n",
      "client_id                    15210391\n",
      "client_name    QUIROGA CASANOVA BRUNO\n",
      "phonenumber                 912496602\n",
      "credit                         194.17\n",
      "Name: 75, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    OTW-288    3 3,357.54\n",
      "1    HFM-021    1   726.91\n",
      "2    DON-719    2   721.38\n",
      "========================================================================================================================\n",
      "client_id                           89429489\n",
      "client_name    SERRANO IPARRAGUIRRE VIRGINIA\n",
      "phonenumber                        926380835\n",
      "credit                              2,325.13\n",
      "Name: 76, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    QUU-384    1 2,545.54\n",
      "1    UXG-019    1   934.91\n",
      "2    VCL-867    6 4,194.42\n",
      "========================================================================================================================\n",
      "client_id                          43488351\n",
      "client_name    MINAYA CERNA LORENA FIORELLA\n",
      "phonenumber                         7039872\n",
      "credit                             5,795.45\n",
      "Name: 77, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty     total\n",
      "0    XLF-273    5 11,859.75\n",
      "1    DIQ-718    6  2,344.80\n",
      "========================================================================================================================\n",
      "client_id                 73185299\n",
      "client_name    CORTES LANDA SURAMI\n",
      "phonenumber                3032891\n",
      "credit                    2,503.63\n",
      "Name: 78, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    OTH-462    3 1,593.12\n",
      "1    QFP-254    5   903.25\n",
      "========================================================================================================================\n",
      "client_id                36380447\n",
      "client_name    RIVERO RETTO JESUS\n",
      "phonenumber             963345715\n",
      "credit                   8,016.96\n",
      "Name: 79, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    OWN-701    5 1,104.10\n",
      "1    HLR-109    2   878.94\n",
      "========================================================================================================================\n",
      "client_id                        97403853\n",
      "client_name    PISCOYA MALCA MARIA MONICA\n",
      "phonenumber                     906047403\n",
      "credit                             657.91\n",
      "Name: 80, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    YJD-279    3 3,085.29\n",
      "1    GBJ-693    4 1,256.80\n",
      "========================================================================================================================\n",
      "client_id                           13245501\n",
      "client_name    ESCALANTE YINO EDWARD GONZALO\n",
      "phonenumber                        897778693\n",
      "credit                                486.92\n",
      "Name: 81, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    AWB-345    1   800.37\n",
      "1    ZWF-661    1 2,731.61\n",
      "2    QIL-029    2 5,981.10\n",
      "========================================================================================================================\n",
      "client_id                   89148118\n",
      "client_name    ZAMBRANO LEYVA ALVARO\n",
      "phonenumber                987004291\n",
      "credit                        921.59\n",
      "Name: 82, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    TKM-141    6 2,413.44\n",
      "1    AFL-718    1 1,664.97\n",
      "========================================================================================================================\n",
      "client_id                         93845419\n",
      "client_name    QUIO GAVIDIA DIALY FELICITA\n",
      "phonenumber                        5696816\n",
      "credit                              815.27\n",
      "Name: 83, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    AWB-345    5 4,001.85\n",
      "1    NSR-955    2 5,182.88\n",
      "========================================================================================================================\n",
      "client_id                    19829266\n",
      "client_name    TOMASICHE MEJIA MELVIN\n",
      "phonenumber                 915529528\n",
      "credit                       2,136.48\n",
      "Name: 84, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    TXM-139    3 3,278.85\n",
      "1    RDT-761    3 2,714.85\n",
      "2    UXG-019    2 1,869.82\n",
      "========================================================================================================================\n",
      "client_id                         26233063\n",
      "client_name    TSUKAZAN AYALA MARINA MAGDA\n",
      "phonenumber                      937953132\n",
      "credit                            4,835.42\n",
      "Name: 85, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    UWA-476    1 1,191.39\n",
      "1    KSO-608    3 2,742.51\n",
      "2    JFC-432    4 1,230.68\n",
      "========================================================================================================================\n",
      "client_id               78922174\n",
      "client_name    ALAMO MEZA ALVARO\n",
      "phonenumber              5307494\n",
      "credit                    830.60\n",
      "Name: 86, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    TKM-141    5 2,011.20\n",
      "1    EJW-346    6 2,158.20\n",
      "========================================================================================================================\n",
      "client_id                       42798099\n",
      "client_name    ZEGARRA MUNOZ SONIA GUIDA\n",
      "phonenumber                    874064223\n",
      "credit                          1,204.73\n",
      "Name: 87, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    TMN-884    5 1,553.25\n",
      "1    OQI-373    2 1,812.32\n",
      "2    RDT-761    6 5,429.70\n",
      "========================================================================================================================\n",
      "client_id                             79901434\n",
      "client_name    SALAZAR FLORENCIO SANDRO JOHNNY\n",
      "phonenumber                          910817217\n",
      "credit                                5,757.60\n",
      "Name: 88, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    AHB-459    3 2,056.50\n",
      "1    TXM-139    2 2,185.90\n",
      "========================================================================================================================\n",
      "client_id                           50375303\n",
      "client_name    SANCHEZ HUAYANAY DIALY LUCERO\n",
      "phonenumber                          5956481\n",
      "credit                              1,483.88\n",
      "Name: 89, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    JXD-139    6 3,516.12\n",
      "========================================================================================================================\n",
      "client_id                              55552996\n",
      "client_name    SUCHERO PRECIADO MILAGROS ERICKA\n",
      "phonenumber                           971740977\n",
      "credit                                 1,002.79\n",
      "Name: 90, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    UXG-019    6 5,609.46\n",
      "1    SJD-818    1 3,387.75\n",
      "========================================================================================================================\n",
      "client_id                            45828535\n",
      "client_name    SEDANO MERCADO FIORELLA GLORIA\n",
      "phonenumber                           4957431\n",
      "credit                                 960.28\n",
      "Name: 91, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    XSD-310    4 9,039.72\n",
      "========================================================================================================================\n",
      "client_id                            44229880\n",
      "client_name    PALOMARES BARRIOS EDWARD CESAR\n",
      "phonenumber                         887564400\n",
      "credit                                 458.57\n",
      "Name: 92, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    JXD-139    4 2,344.08\n",
      "1    HLR-109    5 2,197.35\n",
      "========================================================================================================================\n",
      "client_id                           59162728\n",
      "client_name    HUAYANAY CORTES GLENDA MARINA\n",
      "phonenumber                        960688828\n",
      "credit                              3,217.20\n",
      "Name: 93, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    FEG-454    4 6,782.80\n",
      "========================================================================================================================\n",
      "client_id                          88995291\n",
      "client_name    PEREZ TORRES MILAGROS REBECA\n",
      "phonenumber                       960731274\n",
      "credit                             6,206.29\n",
      "Name: 94, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    MTF-868    3 2,914.77\n",
      "1    HLR-109    2   878.94\n",
      "========================================================================================================================\n",
      "client_id                              73914283\n",
      "client_name    CASANOVA CARBAJAL RICARDO ISRAEL\n",
      "phonenumber                             5786088\n",
      "credit                                 7,039.44\n",
      "Name: 95, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    OBI-353    1 2,960.56\n",
      "========================================================================================================================\n",
      "client_id              44679500\n",
      "client_name    CORREA ARCA HELI\n",
      "phonenumber             3659359\n",
      "credit                 4,199.63\n",
      "Name: 96, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty  total\n",
      "0    AWB-345    1 800.37\n",
      "========================================================================================================================\n",
      "client_id                       59407188\n",
      "client_name    CANALES MOYA ALONSO JULIO\n",
      "phonenumber                    957111009\n",
      "credit                          3,003.89\n",
      "Name: 97, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    BIT-434    6 2,250.54\n",
      "1    OWN-701    1   220.82\n",
      "2    RDT-761    5 4,524.75\n",
      "========================================================================================================================\n",
      "client_id                      27635082\n",
      "client_name    CONTRERAS GUEVARA MARINA\n",
      "phonenumber                   984517554\n",
      "credit                        10,000.00\n",
      "Name: 98, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "Empty DataFrame\n",
      "Columns: [product_id, qty, total]\n",
      "Index: []\n",
      "========================================================================================================================\n",
      "client_id                         54716824\n",
      "client_name    VALVERDE SEGURA MIGUEL JOSE\n",
      "phonenumber                      968948630\n",
      "credit                            7,925.25\n",
      "Name: 99, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    SPR-580    3 1,213.05\n",
      "1    UDR-957    1   861.70\n",
      "========================================================================================================================\n",
      "client_id                        40112594\n",
      "client_name    CARO RARAZ CHRISTIAN RONAL\n",
      "phonenumber                       4538089\n",
      "credit                             272.26\n",
      "Name: 100, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    KSO-608    6 5,485.02\n",
      "1    FVQ-662    4 4,242.72\n",
      "========================================================================================================================\n",
      "client_id                37110873\n",
      "client_name    VERGEL HIJAR JESUS\n",
      "phonenumber               8271950\n",
      "credit                   2,211.97\n",
      "Name: 101, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    SSD-176    1   567.71\n",
      "1    GXF-122    2 2,220.32\n",
      "========================================================================================================================\n",
      "client_id                         83505958\n",
      "client_name    CONTRERAS MEZA ERIKA BLANCA\n",
      "phonenumber                        3913878\n",
      "credit                            8,649.24\n",
      "Name: 102, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    EJW-346    3 1,079.10\n",
      "1    MQR-442    1   271.66\n",
      "========================================================================================================================\n",
      "client_id               85871751\n",
      "client_name    AYALA LAURA JANET\n",
      "phonenumber            933420698\n",
      "credit                  6,986.40\n",
      "Name: 103, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    MYC-756    2 3,013.60\n",
      "========================================================================================================================\n",
      "client_id               11602775\n",
      "client_name    HIJAR ARCA ADOLFO\n",
      "phonenumber            904695641\n",
      "credit                  4,060.24\n",
      "Name: 104, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    JJN-837    1 1,979.92\n",
      "1    JJN-837    2 3,959.84\n",
      "========================================================================================================================\n",
      "client_id                    86402303\n",
      "client_name    RUIZ RUIZ OFELIA DELIA\n",
      "phonenumber                 972026581\n",
      "credit                         201.58\n",
      "Name: 105, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    OQI-373    3 2,718.48\n",
      "1    OQI-373    3 2,718.48\n",
      "2    HFM-021    6 4,361.46\n",
      "========================================================================================================================\n",
      "client_id               23928045\n",
      "client_name    ARCA VILCA RONALD\n",
      "phonenumber              5399501\n",
      "credit                  5,164.56\n",
      "Name: 106, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    TMN-884    2   621.30\n",
      "1    TKM-141    5 2,011.20\n",
      "2    LWG-915    2 2,202.94\n",
      "========================================================================================================================\n",
      "client_id                    12663268\n",
      "client_name    BARRERA FLORES ENRIQUE\n",
      "phonenumber                 891999690\n",
      "credit                       2,561.62\n",
      "Name: 107, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    AHB-459    3 2,056.50\n",
      "1    YYU-726    4 3,071.28\n",
      "2    RAH-420    3   471.03\n",
      "3    BMJ-772    1   936.32\n",
      "4    QFP-254    5   903.25\n",
      "========================================================================================================================\n",
      "client_id                      42928709\n",
      "client_name    HERNANDEZ MALCA VIRGINIA\n",
      "phonenumber                     6822015\n",
      "credit                           315.95\n",
      "Name: 108, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    NSM-283    5 4,684.05\n",
      "========================================================================================================================\n",
      "client_id                    85949265\n",
      "client_name    LEYVA GONZALES CINTHIA\n",
      "phonenumber                 947841946\n",
      "credit                       3,602.63\n",
      "Name: 109, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    JFC-432    4 1,230.68\n",
      "1    YUQ-590    2 3,958.14\n",
      "2    VRR-793    5 1,208.55\n",
      "========================================================================================================================\n",
      "client_id                               17972674\n",
      "client_name    PISCOYA PORTUGAL WALDEMAR GUSTAVO\n",
      "phonenumber                              7133680\n",
      "credit                                  1,705.88\n",
      "Name: 110, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    ZWF-661    1 2,731.61\n",
      "1    UTN-601    1   562.51\n",
      "========================================================================================================================\n",
      "client_id                              38913831\n",
      "client_name    FUENTES TSUKAZAN PATRICIA OFELIA\n",
      "phonenumber                           950215881\n",
      "credit                                 5,037.58\n",
      "Name: 111, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    YZD-580    1 1,582.29\n",
      "1    JFC-432    3   923.01\n",
      "2    FLW-631    3 2,457.12\n",
      "========================================================================================================================\n",
      "client_id                           36008913\n",
      "client_name    CASTILLO ZAMORA VICTOR NESTOR\n",
      "phonenumber                        985923364\n",
      "credit                              5,000.00\n",
      "Name: 112, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "Empty DataFrame\n",
      "Columns: [product_id, qty, total]\n",
      "Index: []\n",
      "========================================================================================================================\n",
      "client_id                             49087435\n",
      "client_name    GALLO MARTINEZ VICTOR GUILLERMO\n",
      "phonenumber                            3714856\n",
      "credit                                1,143.69\n",
      "Name: 113, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    VDD-853    2 2,191.34\n",
      "1    AFL-718    1 1,664.97\n",
      "========================================================================================================================\n",
      "client_id                 58187172\n",
      "client_name    SUAREZ ZIMIC MOISES\n",
      "phonenumber              882248669\n",
      "credit                    3,393.52\n",
      "Name: 114, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    KBY-991    6 6,606.48\n",
      "========================================================================================================================\n",
      "client_id                                69324480\n",
      "client_name    FLORES IPARRAGUIRRE HENRRY RICARDO\n",
      "phonenumber                             993711730\n",
      "credit                                   6,019.71\n",
      "Name: 115, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    UOD-420    3 2,486.82\n",
      "1    DIQ-718    1   390.80\n",
      "2    VJI-529    1 1,102.67\n",
      "========================================================================================================================\n",
      "client_id                  32565207\n",
      "client_name    RIVERA ZARATE MARINA\n",
      "phonenumber                 2654996\n",
      "credit                     1,260.36\n",
      "Name: 116, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    UXG-019    4 3,739.64\n",
      "========================================================================================================================\n",
      "client_id                 71463316\n",
      "client_name    PRADO CALIXTO KARIN\n",
      "phonenumber              998998403\n",
      "credit                    1,943.93\n",
      "Name: 117, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    KCO-488    5 3,398.00\n",
      "1    UWA-476    3 3,574.17\n",
      "2    QFP-254    6 1,083.90\n",
      "========================================================================================================================\n",
      "client_id                        86828079\n",
      "client_name    PRECIADO ADAMS ERIKA DELIA\n",
      "phonenumber                     884791387\n",
      "credit                           9,185.02\n",
      "Name: 118, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty  total\n",
      "0    MQR-442    3 814.98\n",
      "========================================================================================================================\n",
      "client_id                        29337157\n",
      "client_name    VIZCARDO YEP GUIDA YOLANDA\n",
      "phonenumber                     908273495\n",
      "credit                           2,237.20\n",
      "Name: 119, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    HFM-021    4 2,907.64\n",
      "1    WZD-331    4 4,855.16\n",
      "========================================================================================================================\n",
      "client_id                   32904023\n",
      "client_name    PRADO FORZANI LOURDES\n",
      "phonenumber                  4053489\n",
      "credit                      2,437.83\n",
      "Name: 120, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    KJX-387    3 1,839.57\n",
      "1    QFP-254    4   722.60\n",
      "========================================================================================================================\n",
      "client_id                       28390487\n",
      "client_name    IPARRAGUIRRE PAREDES RAUL\n",
      "phonenumber                    967488454\n",
      "credit                          3,895.52\n",
      "Name: 121, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    GLC-370    2 1,104.48\n",
      "========================================================================================================================\n",
      "client_id                         98589725\n",
      "client_name    FORZANI ANTEZANO OSCAR JOSE\n",
      "phonenumber                      894689292\n",
      "credit                            9,758.29\n",
      "Name: 122, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty  total\n",
      "0    VRR-793    1 241.71\n",
      "========================================================================================================================\n",
      "client_id                 77484838\n",
      "client_name    EPIQUEN ALAMO NANCY\n",
      "phonenumber              941780448\n",
      "credit                      355.85\n",
      "Name: 123, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    UWA-476    1 1,191.39\n",
      "1    BTO-226    4 3,452.76\n",
      "========================================================================================================================\n",
      "client_id                        88956889\n",
      "client_name    CHUMPITAZ CARBAJAL MARITZA\n",
      "phonenumber                     935335997\n",
      "credit                           1,369.75\n",
      "Name: 124, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    TMN-884    1   310.65\n",
      "1    YUQ-590    2 3,958.14\n",
      "2    HFM-021    6 4,361.46\n",
      "========================================================================================================================\n",
      "client_id                      89863424\n",
      "client_name    SANTISTEBAN BRAVO EDGARD\n",
      "phonenumber                   990095135\n",
      "credit                         2,046.93\n",
      "Name: 125, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    FVB-607    1 2,953.07\n",
      "========================================================================================================================\n",
      "client_id                       99842319\n",
      "client_name    MARTINEZ MARTINEZ CARMELA\n",
      "phonenumber                      5042430\n",
      "credit                          1,804.08\n",
      "Name: 126, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    DUG-251    2 3,195.92\n",
      "========================================================================================================================\n",
      "client_id                          98140264\n",
      "client_name    ALAMO ZEGARRA ISRAEL GUSTAVO\n",
      "phonenumber                       990418360\n",
      "credit                             6,901.78\n",
      "Name: 127, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    DFF-034    2   518.50\n",
      "1    BRD-969    1 2,579.72\n",
      "========================================================================================================================\n",
      "client_id                       69639726\n",
      "client_name    ROJAS PATINO GONZALO JAIR\n",
      "phonenumber                    930532818\n",
      "credit                            536.87\n",
      "Name: 128, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    OPT-996    3 4,102.44\n",
      "1    DON-719    1   360.69\n",
      "========================================================================================================================\n",
      "client_id                            93160528\n",
      "client_name    SANTISTEBAN MARTEL MARTIN LUIS\n",
      "phonenumber                         945101047\n",
      "credit                               1,036.26\n",
      "Name: 129, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    YYU-726    1   767.82\n",
      "1    DUG-251    2 3,195.92\n",
      "========================================================================================================================\n",
      "client_id                 24995742\n",
      "client_name    MEREL TAVERA WALTER\n",
      "phonenumber                8695140\n",
      "credit                      113.19\n",
      "Name: 130, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    KCO-488    4 2,718.40\n",
      "1    DON-719    3 1,082.07\n",
      "2    BWD-036    1 1,086.34\n",
      "========================================================================================================================\n",
      "client_id                           43043986\n",
      "client_name    LOZADA VALVERDE MOISES HENRRY\n",
      "phonenumber                          8816113\n",
      "credit                              2,979.35\n",
      "Name: 131, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    QFP-254    5   903.25\n",
      "1    SSD-176    5 2,838.55\n",
      "2    TXM-139    3 3,278.85\n",
      "========================================================================================================================\n",
      "client_id                52097922\n",
      "client_name    CUBA DURAND YVONNE\n",
      "phonenumber               3509438\n",
      "credit                     616.26\n",
      "Name: 132, dtype: object\n",
      "------------------------------------------------------------------------------------------------------------------------\n",
      "  product_id  qty    total\n",
      "0    OWN-701    2   441.64\n",
      "1    UTN-601    2 1,125.02\n",
      "2    XZG-521    4 2,817.08\n"
     ]
    }
   ],
   "source": [
    "# reporte\n",
    "\n",
    "# # This creates a report with different order for clients (as they appear in pedidos) \n",
    "# for cid, df in pedidos.groupby('client_id', sort=False):\n",
    "#     print('========================================================================================================================')\n",
    "#     print(clientes.loc[[cid]])\n",
    "#     print('------------------------------------------------------------------------------------------------------------------------')\n",
    "#     print(df.loc[df['served'], ['product_id', 'client_id', 'qty']])\n",
    "\n",
    "for i, client in clientes.reset_index().iterrows():\n",
    "    print('========================================================================================================================')\n",
    "    print(client)\n",
    "    print('------------------------------------------------------------------------------------------------------------------------')\n",
    "    mask = (pedidos['client_id'] == client['client_id']) & (pedidos['served'])\n",
    "    t = pedidos.loc[mask, ['product_id', 'qty']]\n",
    "    t = t.merge(productos, how='left', on='product_id')\n",
    "    t['total'] = t['qty'] * t['price']\n",
    "    print(t[['product_id', 'qty', 'total']])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "10000.0"
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "2_979.35 + 903.25 + 2_838.55 + 3_278.85"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "10864.4"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "0 + 3843.75 + 903.25 + 2838.55 + 3278.85     "
   ]
  }
 ],
 "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.11.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}