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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 9,
6
+ "id": "13e5f761-7237-4973-85e9-e27cd38e9125",
7
+ "metadata": {},
8
+ "outputs": [],
9
+ "source": [
10
+ "# importing packages\n",
11
+ "import pandas as pd"
12
+ ]
13
+ },
14
+ {
15
+ "cell_type": "code",
16
+ "execution_count": 7,
17
+ "id": "1cf46e10-1994-4dda-ba7e-d4e4909b3b60",
18
+ "metadata": {},
19
+ "outputs": [],
20
+ "source": [
21
+ "# Reading Excel file\n",
22
+ "df = pd.read_excel(\"Excelfile.xlsx\")"
23
+ ]
24
+ },
25
+ {
26
+ "cell_type": "code",
27
+ "execution_count": 11,
28
+ "id": "c1cc9afd-3fcf-4ca4-9588-270e75c502fe",
29
+ "metadata": {},
30
+ "outputs": [
31
+ {
32
+ "data": {
33
+ "text/html": [
34
+ "<div>\n",
35
+ "<style scoped>\n",
36
+ " .dataframe tbody tr th:only-of-type {\n",
37
+ " vertical-align: middle;\n",
38
+ " }\n",
39
+ "\n",
40
+ " .dataframe tbody tr th {\n",
41
+ " vertical-align: top;\n",
42
+ " }\n",
43
+ "\n",
44
+ " .dataframe thead th {\n",
45
+ " text-align: right;\n",
46
+ " }\n",
47
+ "</style>\n",
48
+ "<table border=\"1\" class=\"dataframe\">\n",
49
+ " <thead>\n",
50
+ " <tr style=\"text-align: right;\">\n",
51
+ " <th></th>\n",
52
+ " <th>Name</th>\n",
53
+ " <th>age</th>\n",
54
+ " </tr>\n",
55
+ " </thead>\n",
56
+ " <tbody>\n",
57
+ " <tr>\n",
58
+ " <th>0</th>\n",
59
+ " <td>p1</td>\n",
60
+ " <td>23</td>\n",
61
+ " </tr>\n",
62
+ " <tr>\n",
63
+ " <th>1</th>\n",
64
+ " <td>p2</td>\n",
65
+ " <td>24</td>\n",
66
+ " </tr>\n",
67
+ " <tr>\n",
68
+ " <th>2</th>\n",
69
+ " <td>p3</td>\n",
70
+ " <td>26</td>\n",
71
+ " </tr>\n",
72
+ " <tr>\n",
73
+ " <th>3</th>\n",
74
+ " <td>p4</td>\n",
75
+ " <td>27</td>\n",
76
+ " </tr>\n",
77
+ " </tbody>\n",
78
+ "</table>\n",
79
+ "</div>"
80
+ ],
81
+ "text/plain": [
82
+ " Name age\n",
83
+ "0 p1 23\n",
84
+ "1 p2 24\n",
85
+ "2 p3 26\n",
86
+ "3 p4 27"
87
+ ]
88
+ },
89
+ "execution_count": 11,
90
+ "metadata": {},
91
+ "output_type": "execute_result"
92
+ }
93
+ ],
94
+ "source": [
95
+ "# printing Excel file \n",
96
+ "df"
97
+ ]
98
+ },
99
+ {
100
+ "cell_type": "code",
101
+ "execution_count": 17,
102
+ "id": "716013d8-097e-4017-9b4d-d13edfa6a1b7",
103
+ "metadata": {},
104
+ "outputs": [
105
+ {
106
+ "data": {
107
+ "text/html": [
108
+ "<div>\n",
109
+ "<style scoped>\n",
110
+ " .dataframe tbody tr th:only-of-type {\n",
111
+ " vertical-align: middle;\n",
112
+ " }\n",
113
+ "\n",
114
+ " .dataframe tbody tr th {\n",
115
+ " vertical-align: top;\n",
116
+ " }\n",
117
+ "\n",
118
+ " .dataframe thead th {\n",
119
+ " text-align: right;\n",
120
+ " }\n",
121
+ "</style>\n",
122
+ "<table border=\"1\" class=\"dataframe\">\n",
123
+ " <thead>\n",
124
+ " <tr style=\"text-align: right;\">\n",
125
+ " <th></th>\n",
126
+ " <th>Name</th>\n",
127
+ " <th>age</th>\n",
128
+ " </tr>\n",
129
+ " </thead>\n",
130
+ " <tbody>\n",
131
+ " <tr>\n",
132
+ " <th>0</th>\n",
133
+ " <td>p1</td>\n",
134
+ " <td>23</td>\n",
135
+ " </tr>\n",
136
+ " <tr>\n",
137
+ " <th>1</th>\n",
138
+ " <td>p2</td>\n",
139
+ " <td>24</td>\n",
140
+ " </tr>\n",
141
+ " <tr>\n",
142
+ " <th>2</th>\n",
143
+ " <td>p3</td>\n",
144
+ " <td>26</td>\n",
145
+ " </tr>\n",
146
+ " <tr>\n",
147
+ " <th>3</th>\n",
148
+ " <td>p4</td>\n",
149
+ " <td>27</td>\n",
150
+ " </tr>\n",
151
+ " </tbody>\n",
152
+ "</table>\n",
153
+ "</div>"
154
+ ],
155
+ "text/plain": [
156
+ " Name age\n",
157
+ "0 p1 23\n",
158
+ "1 p2 24\n",
159
+ "2 p3 26\n",
160
+ "3 p4 27"
161
+ ]
162
+ },
163
+ "execution_count": 17,
164
+ "metadata": {},
165
+ "output_type": "execute_result"
166
+ }
167
+ ],
168
+ "source": [
169
+ "## Accessing sheets by using indexing\n",
170
+ "df = pd.read_excel(\"Excelfile.xlsx\",sheet_name=0)\n",
171
+ "df"
172
+ ]
173
+ },
174
+ {
175
+ "cell_type": "code",
176
+ "execution_count": 19,
177
+ "id": "89279ae3-5d36-4dc1-8a33-143096977a63",
178
+ "metadata": {},
179
+ "outputs": [
180
+ {
181
+ "data": {
182
+ "text/html": [
183
+ "<div>\n",
184
+ "<style scoped>\n",
185
+ " .dataframe tbody tr th:only-of-type {\n",
186
+ " vertical-align: middle;\n",
187
+ " }\n",
188
+ "\n",
189
+ " .dataframe tbody tr th {\n",
190
+ " vertical-align: top;\n",
191
+ " }\n",
192
+ "\n",
193
+ " .dataframe thead th {\n",
194
+ " text-align: right;\n",
195
+ " }\n",
196
+ "</style>\n",
197
+ "<table border=\"1\" class=\"dataframe\">\n",
198
+ " <thead>\n",
199
+ " <tr style=\"text-align: right;\">\n",
200
+ " <th></th>\n",
201
+ " <th>maths</th>\n",
202
+ " <th>hindi</th>\n",
203
+ " </tr>\n",
204
+ " </thead>\n",
205
+ " <tbody>\n",
206
+ " <tr>\n",
207
+ " <th>0</th>\n",
208
+ " <td>80</td>\n",
209
+ " <td>70</td>\n",
210
+ " </tr>\n",
211
+ " <tr>\n",
212
+ " <th>1</th>\n",
213
+ " <td>80</td>\n",
214
+ " <td>75</td>\n",
215
+ " </tr>\n",
216
+ " <tr>\n",
217
+ " <th>2</th>\n",
218
+ " <td>80</td>\n",
219
+ " <td>70</td>\n",
220
+ " </tr>\n",
221
+ " <tr>\n",
222
+ " <th>3</th>\n",
223
+ " <td>80</td>\n",
224
+ " <td>70</td>\n",
225
+ " </tr>\n",
226
+ " </tbody>\n",
227
+ "</table>\n",
228
+ "</div>"
229
+ ],
230
+ "text/plain": [
231
+ " maths hindi\n",
232
+ "0 80 70\n",
233
+ "1 80 75\n",
234
+ "2 80 70\n",
235
+ "3 80 70"
236
+ ]
237
+ },
238
+ "execution_count": 19,
239
+ "metadata": {},
240
+ "output_type": "execute_result"
241
+ }
242
+ ],
243
+ "source": [
244
+ "df = pd.read_excel(\"Excelfile.xlsx\",sheet_name=1)\n",
245
+ "df"
246
+ ]
247
+ },
248
+ {
249
+ "cell_type": "code",
250
+ "execution_count": 21,
251
+ "id": "78f433a9-4e48-4389-87dd-a79244eaf633",
252
+ "metadata": {},
253
+ "outputs": [
254
+ {
255
+ "data": {
256
+ "text/html": [
257
+ "<div>\n",
258
+ "<style scoped>\n",
259
+ " .dataframe tbody tr th:only-of-type {\n",
260
+ " vertical-align: middle;\n",
261
+ " }\n",
262
+ "\n",
263
+ " .dataframe tbody tr th {\n",
264
+ " vertical-align: top;\n",
265
+ " }\n",
266
+ "\n",
267
+ " .dataframe thead th {\n",
268
+ " text-align: right;\n",
269
+ " }\n",
270
+ "</style>\n",
271
+ "<table border=\"1\" class=\"dataframe\">\n",
272
+ " <thead>\n",
273
+ " <tr style=\"text-align: right;\">\n",
274
+ " <th></th>\n",
275
+ " <th>Science</th>\n",
276
+ " <th>Social</th>\n",
277
+ " </tr>\n",
278
+ " </thead>\n",
279
+ " <tbody>\n",
280
+ " <tr>\n",
281
+ " <th>0</th>\n",
282
+ " <td>50</td>\n",
283
+ " <td>40</td>\n",
284
+ " </tr>\n",
285
+ " <tr>\n",
286
+ " <th>1</th>\n",
287
+ " <td>50</td>\n",
288
+ " <td>40</td>\n",
289
+ " </tr>\n",
290
+ " <tr>\n",
291
+ " <th>2</th>\n",
292
+ " <td>50</td>\n",
293
+ " <td>40</td>\n",
294
+ " </tr>\n",
295
+ " <tr>\n",
296
+ " <th>3</th>\n",
297
+ " <td>50</td>\n",
298
+ " <td>40</td>\n",
299
+ " </tr>\n",
300
+ " </tbody>\n",
301
+ "</table>\n",
302
+ "</div>"
303
+ ],
304
+ "text/plain": [
305
+ " Science Social\n",
306
+ "0 50 40\n",
307
+ "1 50 40\n",
308
+ "2 50 40\n",
309
+ "3 50 40"
310
+ ]
311
+ },
312
+ "execution_count": 21,
313
+ "metadata": {},
314
+ "output_type": "execute_result"
315
+ }
316
+ ],
317
+ "source": [
318
+ "df = pd.read_excel(\"Excelfile.xlsx\",sheet_name=2)\n",
319
+ "df"
320
+ ]
321
+ },
322
+ {
323
+ "cell_type": "code",
324
+ "execution_count": 23,
325
+ "id": "ef312d9c-f759-4186-9195-b7af318fac48",
326
+ "metadata": {},
327
+ "outputs": [
328
+ {
329
+ "data": {
330
+ "text/plain": [
331
+ "{0: Name age\n",
332
+ " 0 p1 23\n",
333
+ " 1 p2 24\n",
334
+ " 2 p3 26\n",
335
+ " 3 p4 27,\n",
336
+ " 1: maths hindi\n",
337
+ " 0 80 70\n",
338
+ " 1 80 75\n",
339
+ " 2 80 70\n",
340
+ " 3 80 70,\n",
341
+ " 2: Science Social\n",
342
+ " 0 50 40\n",
343
+ " 1 50 40\n",
344
+ " 2 50 40\n",
345
+ " 3 50 40}"
346
+ ]
347
+ },
348
+ "execution_count": 23,
349
+ "metadata": {},
350
+ "output_type": "execute_result"
351
+ }
352
+ ],
353
+ "source": [
354
+ "df = pd.read_excel(\"Excelfile.xlsx\",sheet_name=[0,1,2])\n",
355
+ "df"
356
+ ]
357
+ },
358
+ {
359
+ "cell_type": "code",
360
+ "execution_count": 27,
361
+ "id": "1a9dcce1-268c-43c1-876e-c2dc50b86601",
362
+ "metadata": {},
363
+ "outputs": [
364
+ {
365
+ "data": {
366
+ "text/plain": [
367
+ "dict"
368
+ ]
369
+ },
370
+ "execution_count": 27,
371
+ "metadata": {},
372
+ "output_type": "execute_result"
373
+ }
374
+ ],
375
+ "source": [
376
+ "## By reading multiple sheets we can the type of the file changes to Dictonary\n",
377
+ "type(df)"
378
+ ]
379
+ },
380
+ {
381
+ "cell_type": "code",
382
+ "execution_count": 35,
383
+ "id": "c89cae47-e698-4153-a1c1-14f538a9d227",
384
+ "metadata": {},
385
+ "outputs": [
386
+ {
387
+ "data": {
388
+ "text/html": [
389
+ "<div>\n",
390
+ "<style scoped>\n",
391
+ " .dataframe tbody tr th:only-of-type {\n",
392
+ " vertical-align: middle;\n",
393
+ " }\n",
394
+ "\n",
395
+ " .dataframe tbody tr th {\n",
396
+ " vertical-align: top;\n",
397
+ " }\n",
398
+ "\n",
399
+ " .dataframe thead th {\n",
400
+ " text-align: right;\n",
401
+ " }\n",
402
+ "</style>\n",
403
+ "<table border=\"1\" class=\"dataframe\">\n",
404
+ " <thead>\n",
405
+ " <tr style=\"text-align: right;\">\n",
406
+ " <th></th>\n",
407
+ " <th>Name</th>\n",
408
+ " <th>age</th>\n",
409
+ " </tr>\n",
410
+ " </thead>\n",
411
+ " <tbody>\n",
412
+ " <tr>\n",
413
+ " <th>0</th>\n",
414
+ " <td>p1</td>\n",
415
+ " <td>23</td>\n",
416
+ " </tr>\n",
417
+ " <tr>\n",
418
+ " <th>1</th>\n",
419
+ " <td>p2</td>\n",
420
+ " <td>24</td>\n",
421
+ " </tr>\n",
422
+ " <tr>\n",
423
+ " <th>2</th>\n",
424
+ " <td>p3</td>\n",
425
+ " <td>26</td>\n",
426
+ " </tr>\n",
427
+ " <tr>\n",
428
+ " <th>3</th>\n",
429
+ " <td>p4</td>\n",
430
+ " <td>27</td>\n",
431
+ " </tr>\n",
432
+ " </tbody>\n",
433
+ "</table>\n",
434
+ "</div>"
435
+ ],
436
+ "text/plain": [
437
+ " Name age\n",
438
+ "0 p1 23\n",
439
+ "1 p2 24\n",
440
+ "2 p3 26\n",
441
+ "3 p4 27"
442
+ ]
443
+ },
444
+ "execution_count": 35,
445
+ "metadata": {},
446
+ "output_type": "execute_result"
447
+ }
448
+ ],
449
+ "source": [
450
+ "## By this u can acces the file like index\n",
451
+ "df[0]"
452
+ ]
453
+ },
454
+ {
455
+ "cell_type": "code",
456
+ "execution_count": 37,
457
+ "id": "baa7c39d-2a6d-4c8f-814e-98444a69e4f3",
458
+ "metadata": {},
459
+ "outputs": [
460
+ {
461
+ "data": {
462
+ "text/html": [
463
+ "<div>\n",
464
+ "<style scoped>\n",
465
+ " .dataframe tbody tr th:only-of-type {\n",
466
+ " vertical-align: middle;\n",
467
+ " }\n",
468
+ "\n",
469
+ " .dataframe tbody tr th {\n",
470
+ " vertical-align: top;\n",
471
+ " }\n",
472
+ "\n",
473
+ " .dataframe thead th {\n",
474
+ " text-align: right;\n",
475
+ " }\n",
476
+ "</style>\n",
477
+ "<table border=\"1\" class=\"dataframe\">\n",
478
+ " <thead>\n",
479
+ " <tr style=\"text-align: right;\">\n",
480
+ " <th></th>\n",
481
+ " <th>maths</th>\n",
482
+ " <th>hindi</th>\n",
483
+ " </tr>\n",
484
+ " </thead>\n",
485
+ " <tbody>\n",
486
+ " <tr>\n",
487
+ " <th>0</th>\n",
488
+ " <td>80</td>\n",
489
+ " <td>70</td>\n",
490
+ " </tr>\n",
491
+ " <tr>\n",
492
+ " <th>1</th>\n",
493
+ " <td>80</td>\n",
494
+ " <td>75</td>\n",
495
+ " </tr>\n",
496
+ " <tr>\n",
497
+ " <th>2</th>\n",
498
+ " <td>80</td>\n",
499
+ " <td>70</td>\n",
500
+ " </tr>\n",
501
+ " <tr>\n",
502
+ " <th>3</th>\n",
503
+ " <td>80</td>\n",
504
+ " <td>70</td>\n",
505
+ " </tr>\n",
506
+ " </tbody>\n",
507
+ "</table>\n",
508
+ "</div>"
509
+ ],
510
+ "text/plain": [
511
+ " maths hindi\n",
512
+ "0 80 70\n",
513
+ "1 80 75\n",
514
+ "2 80 70\n",
515
+ "3 80 70"
516
+ ]
517
+ },
518
+ "execution_count": 37,
519
+ "metadata": {},
520
+ "output_type": "execute_result"
521
+ }
522
+ ],
523
+ "source": [
524
+ "df[1]"
525
+ ]
526
+ },
527
+ {
528
+ "cell_type": "code",
529
+ "execution_count": 39,
530
+ "id": "78d774ef-7861-431e-9600-7a13a42ec949",
531
+ "metadata": {},
532
+ "outputs": [
533
+ {
534
+ "data": {
535
+ "text/html": [
536
+ "<div>\n",
537
+ "<style scoped>\n",
538
+ " .dataframe tbody tr th:only-of-type {\n",
539
+ " vertical-align: middle;\n",
540
+ " }\n",
541
+ "\n",
542
+ " .dataframe tbody tr th {\n",
543
+ " vertical-align: top;\n",
544
+ " }\n",
545
+ "\n",
546
+ " .dataframe thead th {\n",
547
+ " text-align: right;\n",
548
+ " }\n",
549
+ "</style>\n",
550
+ "<table border=\"1\" class=\"dataframe\">\n",
551
+ " <thead>\n",
552
+ " <tr style=\"text-align: right;\">\n",
553
+ " <th></th>\n",
554
+ " <th>Science</th>\n",
555
+ " <th>Social</th>\n",
556
+ " </tr>\n",
557
+ " </thead>\n",
558
+ " <tbody>\n",
559
+ " <tr>\n",
560
+ " <th>0</th>\n",
561
+ " <td>50</td>\n",
562
+ " <td>40</td>\n",
563
+ " </tr>\n",
564
+ " <tr>\n",
565
+ " <th>1</th>\n",
566
+ " <td>50</td>\n",
567
+ " <td>40</td>\n",
568
+ " </tr>\n",
569
+ " <tr>\n",
570
+ " <th>2</th>\n",
571
+ " <td>50</td>\n",
572
+ " <td>40</td>\n",
573
+ " </tr>\n",
574
+ " <tr>\n",
575
+ " <th>3</th>\n",
576
+ " <td>50</td>\n",
577
+ " <td>40</td>\n",
578
+ " </tr>\n",
579
+ " </tbody>\n",
580
+ "</table>\n",
581
+ "</div>"
582
+ ],
583
+ "text/plain": [
584
+ " Science Social\n",
585
+ "0 50 40\n",
586
+ "1 50 40\n",
587
+ "2 50 40\n",
588
+ "3 50 40"
589
+ ]
590
+ },
591
+ "execution_count": 39,
592
+ "metadata": {},
593
+ "output_type": "execute_result"
594
+ }
595
+ ],
596
+ "source": [
597
+ "df[2]"
598
+ ]
599
+ },
600
+ {
601
+ "cell_type": "code",
602
+ "execution_count": 41,
603
+ "id": "eee9e875-c119-4875-9116-4a4c92635de7",
604
+ "metadata": {},
605
+ "outputs": [],
606
+ "source": [
607
+ "# Saving a single sheet in to xlsx workpage\n",
608
+ "df[0].to_excel(\"Student_info.xlsx\")"
609
+ ]
610
+ },
611
+ {
612
+ "attachments": {
613
+ "0681aafe-4e36-4775-b90c-785770c9bb3f.png": {
614
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAARMAAADDCAYAAACh4PUjAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAB1oSURBVHhe7Z0PbBzVncd/u+lBmybNEUqJeuCE4DXETtIFQcnZtWhStY0XCHFLKSgyKZTstkSRXbm5XlBQziIiqtyItay02FDS1Aq9pqjJhbKbo3dNI5M9WqHWF2IHvEtwrB4N0hEISeEILXvv9+bN7uzs7O7Mzpv1zOzvE73s/J/xm7ff+f3em/39AnP+viELOdikZm7mCIhPxKkL0p5jpqnVtc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+7EGjOQRBuAISE4IgpEBiQhCEFEhMCIKQAokJQRBSUMSkczD3Yz9efBe7kSAIpwli2IGxbQsLc+f45mfDBEHUiuCOrgYY7VsDfsq7RRBErQH4fwB0pdJiiAX8AAAAAElFTkSuQmCC"
615
+ }
616
+ },
617
+ "cell_type": "markdown",
618
+ "id": "a19f4e03-8174-416f-b5c5-f56cb68e033c",
619
+ "metadata": {},
620
+ "source": [
621
+ "## from the above code we can see it storing index values\n",
622
+ "![image.png](attachment:0681aafe-4e36-4775-b90c-785770c9bb3f.png)"
623
+ ]
624
+ },
625
+ {
626
+ "cell_type": "markdown",
627
+ "id": "05075616-d7da-42c8-accd-5b395c87eed6",
628
+ "metadata": {},
629
+ "source": [
630
+ "## Converting Multiple data frames in to excel"
631
+ ]
632
+ },
633
+ {
634
+ "cell_type": "code",
635
+ "execution_count": 50,
636
+ "id": "1cb04e3a-46be-49a4-b864-542cb853075a",
637
+ "metadata": {},
638
+ "outputs": [],
639
+ "source": [
640
+ "with pd.ExcelWriter(\"Excel_Sheets_store.xlsx\") as f:\n",
641
+ " df[0].to_excel(f,sheet_name=\"Student_info\")\n",
642
+ " df[1].to_excel(f,sheet_name=\"Sem1\")\n",
643
+ " df[2].to_excel(f,sheet_name=\"Sem2\")"
644
+ ]
645
+ },
646
+ {
647
+ "attachments": {
648
+ "ebfcefb1-d450-4853-b35d-8e27ecf411fe.png": {
649
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAywAAADGCAYAAAAwuQTkAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAADuoSURBVHhe7d1/bBzneeDxR67vmja9xLmkciiblCC6DtOrQkgFajtrlocQkisTgRPbSRhGtGsRByigcGczAqPwaoWRAdZHOEyAiqn+oRxZCsukcdygoAVLp+JUavOjwMlllNZMagoi16ZttWmS/rg2iW3d+77zzu7M7M6v5S41XH4/wmh3dmbemZ0dzr7PvM87u6GpqemqAAAAAEAGXWc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l24bWetvXAVMBTneXInMMmZQXu48PbDMfTxg9v/dvRB93+sf4ip/dq1dsKlhpmttIFrtsGNvR3SwXdQAEO92rQc9uWutU5fQpux7nJgVd8oCt+Uftg7JpepuvpGwNMVf41WPZbYuddLFGvyKfBSs/t1+QJ5/Q6V7qGPO2tPiOufXRKryhqanpqn1ela997Wvy+c9/3o75vfc9t8jnHhu1Y+l89tFheeEHL9oxAAAAAGl86lOfko9+9KN2bO1auy0sDUP/mKXb8uEf+JkUAAAArHd1bWG5tbVVfun6DXYsnTdevyo/XFiwYwAAAADSaJQWlroGLAAAAACuDVLCAAAAAKDOCFgAAAAAZBYBCwAAAIDMWnHAcv3110tra6sdAwAAAHCt6fq5rqc3ghV3uv/e974nL774orz++uv2FQAAAADXkg5WbrnlFnnf+95nX1m7VhywAAAAAEC90IcFAAAAQGYRsAAAAADILAIWAAAAAJlFwAIAAAAgswhYAAAAAGQWAQsAAACAzCJgAQAAAJBZBCwAAAAAMkrk/wOqR+Mc1YMcyQAAAABJRU5ErkJggg=="
650
+ }
651
+ },
652
+ "cell_type": "markdown",
653
+ "id": "4ecb5c8f-0ca5-4873-b0c7-da6ca752fb92",
654
+ "metadata": {},
655
+ "source": [
656
+ "## Here is the file \n",
657
+ "![image.png](attachment:ebfcefb1-d450-4853-b35d-8e27ecf411fe.png)"
658
+ ]
659
+ },
660
+ {
661
+ "cell_type": "code",
662
+ "execution_count": null,
663
+ "id": "12581be1-79a4-4955-a472-caab829ce604",
664
+ "metadata": {},
665
+ "outputs": [],
666
+ "source": []
667
+ }
668
+ ],
669
+ "metadata": {
670
+ "kernelspec": {
671
+ "display_name": "Python 3 (ipykernel)",
672
+ "language": "python",
673
+ "name": "python3"
674
+ },
675
+ "language_info": {
676
+ "codemirror_mode": {
677
+ "name": "ipython",
678
+ "version": 3
679
+ },
680
+ "file_extension": ".py",
681
+ "mimetype": "text/x-python",
682
+ "name": "python",
683
+ "nbconvert_exporter": "python",
684
+ "pygments_lexer": "ipython3",
685
+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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "id": "28dc5e92-9eb7-48e0-ac81-79abfd0c943b",
6
+ "metadata": {},
7
+ "source": [
8
+ "## How to Handle JSON File "
9
+ ]
10
+ },
11
+ {
12
+ "cell_type": "code",
13
+ "execution_count": 5,
14
+ "id": "21355522-57ed-4671-b394-84a127ef7c1d",
15
+ "metadata": {},
16
+ "outputs": [],
17
+ "source": [
18
+ "import pandas as pd"
19
+ ]
20
+ },
21
+ {
22
+ "cell_type": "code",
23
+ "execution_count": 19,
24
+ "id": "9d3caccb-c3bb-4f8e-9685-36760387ddfe",
25
+ "metadata": {},
26
+ "outputs": [],
27
+ "source": [
28
+ "x = '{\"Name\":[\"p1\",\"p2\"],\"Age\":[21,23]}'\n",
29
+ "## default json format simplest json"
30
+ ]
31
+ },
32
+ {
33
+ "cell_type": "code",
34
+ "execution_count": 9,
35
+ "id": "2f02b14a-4214-438b-adaa-a092dc4c8450",
36
+ "metadata": {},
37
+ "outputs": [
38
+ {
39
+ "name": "stderr",
40
+ "output_type": "stream",
41
+ "text": [
42
+ "C:\\Users\\phane\\AppData\\Local\\Temp\\ipykernel_21116\\1267235832.py:1: FutureWarning: Passing literal json to 'read_json' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object.\n",
43
+ " pd.read_json(x)\n"
44
+ ]
45
+ },
46
+ {
47
+ "data": {
48
+ "text/html": [
49
+ "<div>\n",
50
+ "<style scoped>\n",
51
+ " .dataframe tbody tr th:only-of-type {\n",
52
+ " vertical-align: middle;\n",
53
+ " }\n",
54
+ "\n",
55
+ " .dataframe tbody tr th {\n",
56
+ " vertical-align: top;\n",
57
+ " }\n",
58
+ "\n",
59
+ " .dataframe thead th {\n",
60
+ " text-align: right;\n",
61
+ " }\n",
62
+ "</style>\n",
63
+ "<table border=\"1\" class=\"dataframe\">\n",
64
+ " <thead>\n",
65
+ " <tr style=\"text-align: right;\">\n",
66
+ " <th></th>\n",
67
+ " <th>Name</th>\n",
68
+ " <th>Age</th>\n",
69
+ " </tr>\n",
70
+ " </thead>\n",
71
+ " <tbody>\n",
72
+ " <tr>\n",
73
+ " <th>0</th>\n",
74
+ " <td>p1</td>\n",
75
+ " <td>21</td>\n",
76
+ " </tr>\n",
77
+ " <tr>\n",
78
+ " <th>1</th>\n",
79
+ " <td>p2</td>\n",
80
+ " <td>23</td>\n",
81
+ " </tr>\n",
82
+ " </tbody>\n",
83
+ "</table>\n",
84
+ "</div>"
85
+ ],
86
+ "text/plain": [
87
+ " Name Age\n",
88
+ "0 p1 21\n",
89
+ "1 p2 23"
90
+ ]
91
+ },
92
+ "execution_count": 9,
93
+ "metadata": {},
94
+ "output_type": "execute_result"
95
+ }
96
+ ],
97
+ "source": [
98
+ "pd.read_json(x)"
99
+ ]
100
+ },
101
+ {
102
+ "cell_type": "code",
103
+ "execution_count": 11,
104
+ "id": "fe868609-cbcc-4a2a-a7f6-c4ba76c83b0b",
105
+ "metadata": {},
106
+ "outputs": [],
107
+ "source": [
108
+ "x = '{1:[\"p1\",\"p2\"],\"Age\":[21,23]}' ## keys only take string datatype\n",
109
+ " ## Can't use int,float,complex etc only strings"
110
+ ]
111
+ },
112
+ {
113
+ "cell_type": "code",
114
+ "execution_count": 13,
115
+ "id": "219698c4-4327-4ded-a13c-02d089f2374f",
116
+ "metadata": {},
117
+ "outputs": [
118
+ {
119
+ "name": "stderr",
120
+ "output_type": "stream",
121
+ "text": [
122
+ "C:\\Users\\phane\\AppData\\Local\\Temp\\ipykernel_21116\\1267235832.py:1: FutureWarning: Passing literal json to 'read_json' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object.\n",
123
+ " pd.read_json(x)\n"
124
+ ]
125
+ },
126
+ {
127
+ "ename": "ValueError",
128
+ "evalue": "Key name of object must be 'string' when decoding 'object'",
129
+ "output_type": "error",
130
+ "traceback": [
131
+ "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
132
+ "\u001b[1;31mValueError\u001b[0m Traceback (most recent call last)",
133
+ "Cell \u001b[1;32mIn[13], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[43mpd\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mread_json\u001b[49m\u001b[43m(\u001b[49m\u001b[43mx\u001b[49m\u001b[43m)\u001b[49m\n",
134
+ "File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python311\\site-packages\\pandas\\io\\json\\_json.py:804\u001b[0m, in \u001b[0;36mread_json\u001b[1;34m(path_or_buf, orient, typ, dtype, convert_axes, convert_dates, keep_default_dates, precise_float, date_unit, encoding, encoding_errors, lines, chunksize, compression, nrows, storage_options, dtype_backend, engine)\u001b[0m\n\u001b[0;32m 802\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m json_reader\n\u001b[0;32m 803\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m--> 804\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mjson_reader\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mread\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n",
135
+ "File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python311\\site-packages\\pandas\\io\\json\\_json.py:1014\u001b[0m, in \u001b[0;36mJsonReader.read\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 1012\u001b[0m obj \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_get_object_parser(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_combine_lines(data_lines))\n\u001b[0;32m 1013\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m-> 1014\u001b[0m obj \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_get_object_parser\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdata\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 1015\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdtype_backend \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m lib\u001b[38;5;241m.\u001b[39mno_default:\n\u001b[0;32m 1016\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m obj\u001b[38;5;241m.\u001b[39mconvert_dtypes(\n\u001b[0;32m 1017\u001b[0m infer_objects\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mFalse\u001b[39;00m, dtype_backend\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdtype_backend\n\u001b[0;32m 1018\u001b[0m )\n",
136
+ "File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python311\\site-packages\\pandas\\io\\json\\_json.py:1040\u001b[0m, in \u001b[0;36mJsonReader._get_object_parser\u001b[1;34m(self, json)\u001b[0m\n\u001b[0;32m 1038\u001b[0m obj \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m 1039\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m typ \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mframe\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[1;32m-> 1040\u001b[0m obj \u001b[38;5;241m=\u001b[39m \u001b[43mFrameParser\u001b[49m\u001b[43m(\u001b[49m\u001b[43mjson\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mparse\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 1042\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m typ \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mseries\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01mor\u001b[39;00m obj \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[0;32m 1043\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(dtype, \u001b[38;5;28mbool\u001b[39m):\n",
137
+ "File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python311\\site-packages\\pandas\\io\\json\\_json.py:1173\u001b[0m, in \u001b[0;36mParser.parse\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 1172\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mparse\u001b[39m(\u001b[38;5;28mself\u001b[39m):\n\u001b[1;32m-> 1173\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_parse\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 1175\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mobj \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[0;32m 1176\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n",
138
+ "File \u001b[1;32m~\\AppData\\Roaming\\Python\\Python311\\site-packages\\pandas\\io\\json\\_json.py:1366\u001b[0m, in \u001b[0;36mFrameParser._parse\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 1362\u001b[0m orient \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39morient\n\u001b[0;32m 1364\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m orient \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcolumns\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[0;32m 1365\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mobj \u001b[38;5;241m=\u001b[39m DataFrame(\n\u001b[1;32m-> 1366\u001b[0m \u001b[43mujson_loads\u001b[49m\u001b[43m(\u001b[49m\u001b[43mjson\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mprecise_float\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mprecise_float\u001b[49m\u001b[43m)\u001b[49m, dtype\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m 1367\u001b[0m )\n\u001b[0;32m 1368\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m orient \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124msplit\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[0;32m 1369\u001b[0m decoded \u001b[38;5;241m=\u001b[39m {\n\u001b[0;32m 1370\u001b[0m \u001b[38;5;28mstr\u001b[39m(k): v\n\u001b[0;32m 1371\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m k, v \u001b[38;5;129;01min\u001b[39;00m ujson_loads(json, precise_float\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mprecise_float)\u001b[38;5;241m.\u001b[39mitems()\n\u001b[0;32m 1372\u001b[0m }\n",
139
+ "\u001b[1;31mValueError\u001b[0m: Key name of object must be 'string' when decoding 'object'"
140
+ ]
141
+ }
142
+ ],
143
+ "source": [
144
+ "pd.read_json(x)"
145
+ ]
146
+ },
147
+ {
148
+ "cell_type": "markdown",
149
+ "id": "aee864df-c2ec-4af4-a713-a7f055cf6022",
150
+ "metadata": {},
151
+ "source": [
152
+ "simplest form of json is\n",
153
+ "\n",
154
+ "where keys -- acting as column names\n",
155
+ "\n",
156
+ "where values --- acting as column values\n",
157
+ "\n",
158
+ "x = '{\"Name\":[\"p1\",\"p2\"],\"Age\":[21,23]}'"
159
+ ]
160
+ },
161
+ {
162
+ "cell_type": "markdown",
163
+ "id": "78d82fd6-2131-479c-8d2e-1f984bf5880d",
164
+ "metadata": {},
165
+ "source": [
166
+ "### Different formats of json"
167
+ ]
168
+ },
169
+ {
170
+ "cell_type": "code",
171
+ "execution_count": 21,
172
+ "id": "f2a97611-b08f-4e69-bf41-6d88c08c783b",
173
+ "metadata": {},
174
+ "outputs": [],
175
+ "source": [
176
+ "x = '{\"Name\":[\"p1\",\"p2\"],\"Age\":[21,23]}'"
177
+ ]
178
+ },
179
+ {
180
+ "cell_type": "code",
181
+ "execution_count": 23,
182
+ "id": "1c22bf02-d8ac-4db6-a63d-6d0080f32f1a",
183
+ "metadata": {
184
+ "scrolled": true
185
+ },
186
+ "outputs": [
187
+ {
188
+ "name": "stderr",
189
+ "output_type": "stream",
190
+ "text": [
191
+ "C:\\Users\\phane\\AppData\\Local\\Temp\\ipykernel_21116\\1694729012.py:1: FutureWarning: Passing literal json to 'read_json' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object.\n",
192
+ " data=pd.read_json(x)\n"
193
+ ]
194
+ }
195
+ ],
196
+ "source": [
197
+ "data=pd.read_json(x)"
198
+ ]
199
+ },
200
+ {
201
+ "cell_type": "code",
202
+ "execution_count": 25,
203
+ "id": "7c10bb05-0e33-4269-81dd-75a721e10b3c",
204
+ "metadata": {},
205
+ "outputs": [
206
+ {
207
+ "data": {
208
+ "text/html": [
209
+ "<div>\n",
210
+ "<style scoped>\n",
211
+ " .dataframe tbody tr th:only-of-type {\n",
212
+ " vertical-align: middle;\n",
213
+ " }\n",
214
+ "\n",
215
+ " .dataframe tbody tr th {\n",
216
+ " vertical-align: top;\n",
217
+ " }\n",
218
+ "\n",
219
+ " .dataframe thead th {\n",
220
+ " text-align: right;\n",
221
+ " }\n",
222
+ "</style>\n",
223
+ "<table border=\"1\" class=\"dataframe\">\n",
224
+ " <thead>\n",
225
+ " <tr style=\"text-align: right;\">\n",
226
+ " <th></th>\n",
227
+ " <th>Name</th>\n",
228
+ " <th>Age</th>\n",
229
+ " </tr>\n",
230
+ " </thead>\n",
231
+ " <tbody>\n",
232
+ " <tr>\n",
233
+ " <th>0</th>\n",
234
+ " <td>p1</td>\n",
235
+ " <td>21</td>\n",
236
+ " </tr>\n",
237
+ " <tr>\n",
238
+ " <th>1</th>\n",
239
+ " <td>p2</td>\n",
240
+ " <td>23</td>\n",
241
+ " </tr>\n",
242
+ " </tbody>\n",
243
+ "</table>\n",
244
+ "</div>"
245
+ ],
246
+ "text/plain": [
247
+ " Name Age\n",
248
+ "0 p1 21\n",
249
+ "1 p2 23"
250
+ ]
251
+ },
252
+ "execution_count": 25,
253
+ "metadata": {},
254
+ "output_type": "execute_result"
255
+ }
256
+ ],
257
+ "source": [
258
+ "data"
259
+ ]
260
+ },
261
+ {
262
+ "cell_type": "code",
263
+ "execution_count": 27,
264
+ "id": "3a58ef44-7f9e-402d-bfd7-770a46eaea2c",
265
+ "metadata": {},
266
+ "outputs": [],
267
+ "source": [
268
+ "x2=data.to_json(orient=\"index\")"
269
+ ]
270
+ },
271
+ {
272
+ "cell_type": "code",
273
+ "execution_count": 29,
274
+ "id": "34766414-bd0b-4a5e-b278-37b31471ea7b",
275
+ "metadata": {},
276
+ "outputs": [
277
+ {
278
+ "data": {
279
+ "text/plain": [
280
+ "'{\"0\":{\"Name\":\"p1\",\"Age\":21},\"1\":{\"Name\":\"p2\",\"Age\":23}}'"
281
+ ]
282
+ },
283
+ "execution_count": 29,
284
+ "metadata": {},
285
+ "output_type": "execute_result"
286
+ }
287
+ ],
288
+ "source": [
289
+ "x2"
290
+ ]
291
+ },
292
+ {
293
+ "cell_type": "code",
294
+ "execution_count": 31,
295
+ "id": "a49cf619-73d0-4c6a-9716-a65020e13b7a",
296
+ "metadata": {},
297
+ "outputs": [
298
+ {
299
+ "name": "stderr",
300
+ "output_type": "stream",
301
+ "text": [
302
+ "C:\\Users\\phane\\AppData\\Local\\Temp\\ipykernel_21116\\1222398037.py:1: FutureWarning: Passing literal json to 'read_json' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object.\n",
303
+ " pd.read_json(x2,orient=\"index\")\n"
304
+ ]
305
+ },
306
+ {
307
+ "data": {
308
+ "text/html": [
309
+ "<div>\n",
310
+ "<style scoped>\n",
311
+ " .dataframe tbody tr th:only-of-type {\n",
312
+ " vertical-align: middle;\n",
313
+ " }\n",
314
+ "\n",
315
+ " .dataframe tbody tr th {\n",
316
+ " vertical-align: top;\n",
317
+ " }\n",
318
+ "\n",
319
+ " .dataframe thead th {\n",
320
+ " text-align: right;\n",
321
+ " }\n",
322
+ "</style>\n",
323
+ "<table border=\"1\" class=\"dataframe\">\n",
324
+ " <thead>\n",
325
+ " <tr style=\"text-align: right;\">\n",
326
+ " <th></th>\n",
327
+ " <th>Name</th>\n",
328
+ " <th>Age</th>\n",
329
+ " </tr>\n",
330
+ " </thead>\n",
331
+ " <tbody>\n",
332
+ " <tr>\n",
333
+ " <th>0</th>\n",
334
+ " <td>p1</td>\n",
335
+ " <td>21</td>\n",
336
+ " </tr>\n",
337
+ " <tr>\n",
338
+ " <th>1</th>\n",
339
+ " <td>p2</td>\n",
340
+ " <td>23</td>\n",
341
+ " </tr>\n",
342
+ " </tbody>\n",
343
+ "</table>\n",
344
+ "</div>"
345
+ ],
346
+ "text/plain": [
347
+ " Name Age\n",
348
+ "0 p1 21\n",
349
+ "1 p2 23"
350
+ ]
351
+ },
352
+ "execution_count": 31,
353
+ "metadata": {},
354
+ "output_type": "execute_result"
355
+ }
356
+ ],
357
+ "source": [
358
+ "pd.read_json(x2,orient=\"index\")"
359
+ ]
360
+ },
361
+ {
362
+ "cell_type": "code",
363
+ "execution_count": 33,
364
+ "id": "6bc7744c-2bfc-48c4-9b39-61528800d00d",
365
+ "metadata": {},
366
+ "outputs": [],
367
+ "source": [
368
+ "x3 =data.to_json(orient=\"columns\")"
369
+ ]
370
+ },
371
+ {
372
+ "cell_type": "code",
373
+ "execution_count": 35,
374
+ "id": "86423e62-8dac-491e-ac5d-d4b9c2ea74b0",
375
+ "metadata": {},
376
+ "outputs": [
377
+ {
378
+ "data": {
379
+ "text/plain": [
380
+ "'{\"Name\":{\"0\":\"p1\",\"1\":\"p2\"},\"Age\":{\"0\":21,\"1\":23}}'"
381
+ ]
382
+ },
383
+ "execution_count": 35,
384
+ "metadata": {},
385
+ "output_type": "execute_result"
386
+ }
387
+ ],
388
+ "source": [
389
+ "x3"
390
+ ]
391
+ },
392
+ {
393
+ "cell_type": "code",
394
+ "execution_count": 37,
395
+ "id": "e423c198-c578-4348-b085-c475126a354b",
396
+ "metadata": {},
397
+ "outputs": [
398
+ {
399
+ "name": "stderr",
400
+ "output_type": "stream",
401
+ "text": [
402
+ "C:\\Users\\phane\\AppData\\Local\\Temp\\ipykernel_21116\\2742886167.py:1: FutureWarning: Passing literal json to 'read_json' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object.\n",
403
+ " pd.read_json(x3,orient=\"columns\")\n"
404
+ ]
405
+ },
406
+ {
407
+ "data": {
408
+ "text/html": [
409
+ "<div>\n",
410
+ "<style scoped>\n",
411
+ " .dataframe tbody tr th:only-of-type {\n",
412
+ " vertical-align: middle;\n",
413
+ " }\n",
414
+ "\n",
415
+ " .dataframe tbody tr th {\n",
416
+ " vertical-align: top;\n",
417
+ " }\n",
418
+ "\n",
419
+ " .dataframe thead th {\n",
420
+ " text-align: right;\n",
421
+ " }\n",
422
+ "</style>\n",
423
+ "<table border=\"1\" class=\"dataframe\">\n",
424
+ " <thead>\n",
425
+ " <tr style=\"text-align: right;\">\n",
426
+ " <th></th>\n",
427
+ " <th>Name</th>\n",
428
+ " <th>Age</th>\n",
429
+ " </tr>\n",
430
+ " </thead>\n",
431
+ " <tbody>\n",
432
+ " <tr>\n",
433
+ " <th>0</th>\n",
434
+ " <td>p1</td>\n",
435
+ " <td>21</td>\n",
436
+ " </tr>\n",
437
+ " <tr>\n",
438
+ " <th>1</th>\n",
439
+ " <td>p2</td>\n",
440
+ " <td>23</td>\n",
441
+ " </tr>\n",
442
+ " </tbody>\n",
443
+ "</table>\n",
444
+ "</div>"
445
+ ],
446
+ "text/plain": [
447
+ " Name Age\n",
448
+ "0 p1 21\n",
449
+ "1 p2 23"
450
+ ]
451
+ },
452
+ "execution_count": 37,
453
+ "metadata": {},
454
+ "output_type": "execute_result"
455
+ }
456
+ ],
457
+ "source": [
458
+ "pd.read_json(x3,orient=\"columns\")"
459
+ ]
460
+ },
461
+ {
462
+ "cell_type": "code",
463
+ "execution_count": 39,
464
+ "id": "4be204f3-2bd7-44a5-9be6-c9dc59de9c34",
465
+ "metadata": {},
466
+ "outputs": [],
467
+ "source": [
468
+ "x4 = data.to_json(orient=\"values\")"
469
+ ]
470
+ },
471
+ {
472
+ "cell_type": "code",
473
+ "execution_count": 41,
474
+ "id": "69aebd67-53ad-4165-8c6b-51a9c8eb0c72",
475
+ "metadata": {},
476
+ "outputs": [
477
+ {
478
+ "data": {
479
+ "text/plain": [
480
+ "'[[\"p1\",21],[\"p2\",23]]'"
481
+ ]
482
+ },
483
+ "execution_count": 41,
484
+ "metadata": {},
485
+ "output_type": "execute_result"
486
+ }
487
+ ],
488
+ "source": [
489
+ "x4"
490
+ ]
491
+ },
492
+ {
493
+ "cell_type": "code",
494
+ "execution_count": 43,
495
+ "id": "84861077-1022-40f1-b498-c29589ad73da",
496
+ "metadata": {},
497
+ "outputs": [
498
+ {
499
+ "name": "stderr",
500
+ "output_type": "stream",
501
+ "text": [
502
+ "C:\\Users\\phane\\AppData\\Local\\Temp\\ipykernel_21116\\2664431613.py:1: FutureWarning: Passing literal json to 'read_json' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object.\n",
503
+ " pd.read_json(x4,orient=\"values\")\n"
504
+ ]
505
+ },
506
+ {
507
+ "data": {
508
+ "text/html": [
509
+ "<div>\n",
510
+ "<style scoped>\n",
511
+ " .dataframe tbody tr th:only-of-type {\n",
512
+ " vertical-align: middle;\n",
513
+ " }\n",
514
+ "\n",
515
+ " .dataframe tbody tr th {\n",
516
+ " vertical-align: top;\n",
517
+ " }\n",
518
+ "\n",
519
+ " .dataframe thead th {\n",
520
+ " text-align: right;\n",
521
+ " }\n",
522
+ "</style>\n",
523
+ "<table border=\"1\" class=\"dataframe\">\n",
524
+ " <thead>\n",
525
+ " <tr style=\"text-align: right;\">\n",
526
+ " <th></th>\n",
527
+ " <th>0</th>\n",
528
+ " <th>1</th>\n",
529
+ " </tr>\n",
530
+ " </thead>\n",
531
+ " <tbody>\n",
532
+ " <tr>\n",
533
+ " <th>0</th>\n",
534
+ " <td>p1</td>\n",
535
+ " <td>21</td>\n",
536
+ " </tr>\n",
537
+ " <tr>\n",
538
+ " <th>1</th>\n",
539
+ " <td>p2</td>\n",
540
+ " <td>23</td>\n",
541
+ " </tr>\n",
542
+ " </tbody>\n",
543
+ "</table>\n",
544
+ "</div>"
545
+ ],
546
+ "text/plain": [
547
+ " 0 1\n",
548
+ "0 p1 21\n",
549
+ "1 p2 23"
550
+ ]
551
+ },
552
+ "execution_count": 43,
553
+ "metadata": {},
554
+ "output_type": "execute_result"
555
+ }
556
+ ],
557
+ "source": [
558
+ "pd.read_json(x4,orient=\"values\")"
559
+ ]
560
+ },
561
+ {
562
+ "cell_type": "code",
563
+ "execution_count": 45,
564
+ "id": "2d7f9405-52d3-463f-9b64-661cfebe7f5f",
565
+ "metadata": {},
566
+ "outputs": [],
567
+ "source": [
568
+ "x5=data.to_json(orient=\"split\")"
569
+ ]
570
+ },
571
+ {
572
+ "cell_type": "code",
573
+ "execution_count": 47,
574
+ "id": "61854715-9985-45d7-82d5-219738238c4c",
575
+ "metadata": {},
576
+ "outputs": [
577
+ {
578
+ "data": {
579
+ "text/plain": [
580
+ "'{\"columns\":[\"Name\",\"Age\"],\"index\":[0,1],\"data\":[[\"p1\",21],[\"p2\",23]]}'"
581
+ ]
582
+ },
583
+ "execution_count": 47,
584
+ "metadata": {},
585
+ "output_type": "execute_result"
586
+ }
587
+ ],
588
+ "source": [
589
+ "x5"
590
+ ]
591
+ },
592
+ {
593
+ "cell_type": "code",
594
+ "execution_count": 49,
595
+ "id": "0202339c-e171-4e98-824b-bfc551cad385",
596
+ "metadata": {},
597
+ "outputs": [
598
+ {
599
+ "name": "stderr",
600
+ "output_type": "stream",
601
+ "text": [
602
+ "C:\\Users\\phane\\AppData\\Local\\Temp\\ipykernel_21116\\426387458.py:1: FutureWarning: Passing literal json to 'read_json' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object.\n",
603
+ " pd.read_json(x5,orient=\"split\")\n"
604
+ ]
605
+ },
606
+ {
607
+ "data": {
608
+ "text/html": [
609
+ "<div>\n",
610
+ "<style scoped>\n",
611
+ " .dataframe tbody tr th:only-of-type {\n",
612
+ " vertical-align: middle;\n",
613
+ " }\n",
614
+ "\n",
615
+ " .dataframe tbody tr th {\n",
616
+ " vertical-align: top;\n",
617
+ " }\n",
618
+ "\n",
619
+ " .dataframe thead th {\n",
620
+ " text-align: right;\n",
621
+ " }\n",
622
+ "</style>\n",
623
+ "<table border=\"1\" class=\"dataframe\">\n",
624
+ " <thead>\n",
625
+ " <tr style=\"text-align: right;\">\n",
626
+ " <th></th>\n",
627
+ " <th>Name</th>\n",
628
+ " <th>Age</th>\n",
629
+ " </tr>\n",
630
+ " </thead>\n",
631
+ " <tbody>\n",
632
+ " <tr>\n",
633
+ " <th>0</th>\n",
634
+ " <td>p1</td>\n",
635
+ " <td>21</td>\n",
636
+ " </tr>\n",
637
+ " <tr>\n",
638
+ " <th>1</th>\n",
639
+ " <td>p2</td>\n",
640
+ " <td>23</td>\n",
641
+ " </tr>\n",
642
+ " </tbody>\n",
643
+ "</table>\n",
644
+ "</div>"
645
+ ],
646
+ "text/plain": [
647
+ " Name Age\n",
648
+ "0 p1 21\n",
649
+ "1 p2 23"
650
+ ]
651
+ },
652
+ "execution_count": 49,
653
+ "metadata": {},
654
+ "output_type": "execute_result"
655
+ }
656
+ ],
657
+ "source": [
658
+ "pd.read_json(x5,orient=\"split\")"
659
+ ]
660
+ },
661
+ {
662
+ "cell_type": "markdown",
663
+ "id": "417984db-6e36-44d2-89bb-097dae27edbd",
664
+ "metadata": {},
665
+ "source": [
666
+ "### Semi-Structured Json file"
667
+ ]
668
+ },
669
+ {
670
+ "cell_type": "code",
671
+ "execution_count": 52,
672
+ "id": "0bdd7908-27f7-43ae-9d82-ee8617f0dcf3",
673
+ "metadata": {},
674
+ "outputs": [],
675
+ "source": [
676
+ "x = {\"Name\":\"p1\",\"marks\":21} #semi_structure takes the format in dictionary\n",
677
+ " # whereas structured json takes the format in string"
678
+ ]
679
+ },
680
+ {
681
+ "cell_type": "code",
682
+ "execution_count": 54,
683
+ "id": "e09e79a7-6e65-40e3-8adf-cafa4365235e",
684
+ "metadata": {},
685
+ "outputs": [
686
+ {
687
+ "data": {
688
+ "text/plain": [
689
+ "{'Name': 'p1', 'marks': 21}"
690
+ ]
691
+ },
692
+ "execution_count": 54,
693
+ "metadata": {},
694
+ "output_type": "execute_result"
695
+ }
696
+ ],
697
+ "source": [
698
+ "x"
699
+ ]
700
+ },
701
+ {
702
+ "cell_type": "code",
703
+ "execution_count": 56,
704
+ "id": "aa1a3330-ed5e-46b4-b910-65f8d4dfb98c",
705
+ "metadata": {},
706
+ "outputs": [
707
+ {
708
+ "data": {
709
+ "text/plain": [
710
+ "dict"
711
+ ]
712
+ },
713
+ "execution_count": 56,
714
+ "metadata": {},
715
+ "output_type": "execute_result"
716
+ }
717
+ ],
718
+ "source": [
719
+ "type(x)"
720
+ ]
721
+ },
722
+ {
723
+ "cell_type": "code",
724
+ "execution_count": 58,
725
+ "id": "01f92058-ff34-44a3-9d5b-08dfa5c96ab2",
726
+ "metadata": {},
727
+ "outputs": [],
728
+ "source": [
729
+ "x = {\"Name\":\"p1\",\"marks\":{\"Maths\":21,\"Hindi\":20}}"
730
+ ]
731
+ },
732
+ {
733
+ "cell_type": "code",
734
+ "execution_count": 60,
735
+ "id": "9cd606ed-9eca-4a10-a660-6871411c08cc",
736
+ "metadata": {},
737
+ "outputs": [
738
+ {
739
+ "data": {
740
+ "text/html": [
741
+ "<div>\n",
742
+ "<style scoped>\n",
743
+ " .dataframe tbody tr th:only-of-type {\n",
744
+ " vertical-align: middle;\n",
745
+ " }\n",
746
+ "\n",
747
+ " .dataframe tbody tr th {\n",
748
+ " vertical-align: top;\n",
749
+ " }\n",
750
+ "\n",
751
+ " .dataframe thead th {\n",
752
+ " text-align: right;\n",
753
+ " }\n",
754
+ "</style>\n",
755
+ "<table border=\"1\" class=\"dataframe\">\n",
756
+ " <thead>\n",
757
+ " <tr style=\"text-align: right;\">\n",
758
+ " <th></th>\n",
759
+ " <th>Name</th>\n",
760
+ " <th>marks.Maths</th>\n",
761
+ " <th>marks.Hindi</th>\n",
762
+ " </tr>\n",
763
+ " </thead>\n",
764
+ " <tbody>\n",
765
+ " <tr>\n",
766
+ " <th>0</th>\n",
767
+ " <td>p1</td>\n",
768
+ " <td>21</td>\n",
769
+ " <td>20</td>\n",
770
+ " </tr>\n",
771
+ " </tbody>\n",
772
+ "</table>\n",
773
+ "</div>"
774
+ ],
775
+ "text/plain": [
776
+ " Name marks.Maths marks.Hindi\n",
777
+ "0 p1 21 20"
778
+ ]
779
+ },
780
+ "execution_count": 60,
781
+ "metadata": {},
782
+ "output_type": "execute_result"
783
+ }
784
+ ],
785
+ "source": [
786
+ "pd.json_normalize(x)"
787
+ ]
788
+ },
789
+ {
790
+ "cell_type": "code",
791
+ "execution_count": 62,
792
+ "id": "b33b31da-2fdf-42de-8420-e3aa534a0f15",
793
+ "metadata": {},
794
+ "outputs": [],
795
+ "source": [
796
+ "x = {\"Name\":\"p1\",\"marks\":{\"Sem1\":{\"Maths\":21,\"Hindi\":20},\"Sem2\":{\"Maths\":22,\"Hindi\":25}}}"
797
+ ]
798
+ },
799
+ {
800
+ "cell_type": "code",
801
+ "execution_count": 64,
802
+ "id": "2f963f46-bfea-4228-b582-315b3c69b204",
803
+ "metadata": {},
804
+ "outputs": [
805
+ {
806
+ "data": {
807
+ "text/html": [
808
+ "<div>\n",
809
+ "<style scoped>\n",
810
+ " .dataframe tbody tr th:only-of-type {\n",
811
+ " vertical-align: middle;\n",
812
+ " }\n",
813
+ "\n",
814
+ " .dataframe tbody tr th {\n",
815
+ " vertical-align: top;\n",
816
+ " }\n",
817
+ "\n",
818
+ " .dataframe thead th {\n",
819
+ " text-align: right;\n",
820
+ " }\n",
821
+ "</style>\n",
822
+ "<table border=\"1\" class=\"dataframe\">\n",
823
+ " <thead>\n",
824
+ " <tr style=\"text-align: right;\">\n",
825
+ " <th></th>\n",
826
+ " <th>Name</th>\n",
827
+ " <th>marks.Sem1.Maths</th>\n",
828
+ " <th>marks.Sem1.Hindi</th>\n",
829
+ " <th>marks.Sem2.Maths</th>\n",
830
+ " <th>marks.Sem2.Hindi</th>\n",
831
+ " </tr>\n",
832
+ " </thead>\n",
833
+ " <tbody>\n",
834
+ " <tr>\n",
835
+ " <th>0</th>\n",
836
+ " <td>p1</td>\n",
837
+ " <td>21</td>\n",
838
+ " <td>20</td>\n",
839
+ " <td>22</td>\n",
840
+ " <td>25</td>\n",
841
+ " </tr>\n",
842
+ " </tbody>\n",
843
+ "</table>\n",
844
+ "</div>"
845
+ ],
846
+ "text/plain": [
847
+ " Name marks.Sem1.Maths marks.Sem1.Hindi marks.Sem2.Maths marks.Sem2.Hindi\n",
848
+ "0 p1 21 20 22 25"
849
+ ]
850
+ },
851
+ "execution_count": 64,
852
+ "metadata": {},
853
+ "output_type": "execute_result"
854
+ }
855
+ ],
856
+ "source": [
857
+ "pd.json_normalize(x)"
858
+ ]
859
+ },
860
+ {
861
+ "cell_type": "code",
862
+ "execution_count": 66,
863
+ "id": "3909cf20-5a69-4374-bcbb-c0b60566b2fc",
864
+ "metadata": {},
865
+ "outputs": [
866
+ {
867
+ "data": {
868
+ "text/html": [
869
+ "<div>\n",
870
+ "<style scoped>\n",
871
+ " .dataframe tbody tr th:only-of-type {\n",
872
+ " vertical-align: middle;\n",
873
+ " }\n",
874
+ "\n",
875
+ " .dataframe tbody tr th {\n",
876
+ " vertical-align: top;\n",
877
+ " }\n",
878
+ "\n",
879
+ " .dataframe thead th {\n",
880
+ " text-align: right;\n",
881
+ " }\n",
882
+ "</style>\n",
883
+ "<table border=\"1\" class=\"dataframe\">\n",
884
+ " <thead>\n",
885
+ " <tr style=\"text-align: right;\">\n",
886
+ " <th></th>\n",
887
+ " <th>Name</th>\n",
888
+ " <th>marks</th>\n",
889
+ " </tr>\n",
890
+ " </thead>\n",
891
+ " <tbody>\n",
892
+ " <tr>\n",
893
+ " <th>0</th>\n",
894
+ " <td>p1</td>\n",
895
+ " <td>{'Sem1': {'Maths': 21, 'Hindi': 20}, 'Sem2': {...</td>\n",
896
+ " </tr>\n",
897
+ " </tbody>\n",
898
+ "</table>\n",
899
+ "</div>"
900
+ ],
901
+ "text/plain": [
902
+ " Name marks\n",
903
+ "0 p1 {'Sem1': {'Maths': 21, 'Hindi': 20}, 'Sem2': {..."
904
+ ]
905
+ },
906
+ "execution_count": 66,
907
+ "metadata": {},
908
+ "output_type": "execute_result"
909
+ }
910
+ ],
911
+ "source": [
912
+ "pd.json_normalize(x,max_level=0)"
913
+ ]
914
+ },
915
+ {
916
+ "cell_type": "code",
917
+ "execution_count": 68,
918
+ "id": "5bf94916-44e4-4e2e-909c-fba2f241b8d3",
919
+ "metadata": {},
920
+ "outputs": [
921
+ {
922
+ "data": {
923
+ "text/html": [
924
+ "<div>\n",
925
+ "<style scoped>\n",
926
+ " .dataframe tbody tr th:only-of-type {\n",
927
+ " vertical-align: middle;\n",
928
+ " }\n",
929
+ "\n",
930
+ " .dataframe tbody tr th {\n",
931
+ " vertical-align: top;\n",
932
+ " }\n",
933
+ "\n",
934
+ " .dataframe thead th {\n",
935
+ " text-align: right;\n",
936
+ " }\n",
937
+ "</style>\n",
938
+ "<table border=\"1\" class=\"dataframe\">\n",
939
+ " <thead>\n",
940
+ " <tr style=\"text-align: right;\">\n",
941
+ " <th></th>\n",
942
+ " <th>Name</th>\n",
943
+ " <th>marks.Sem1</th>\n",
944
+ " <th>marks.Sem2</th>\n",
945
+ " </tr>\n",
946
+ " </thead>\n",
947
+ " <tbody>\n",
948
+ " <tr>\n",
949
+ " <th>0</th>\n",
950
+ " <td>p1</td>\n",
951
+ " <td>{'Maths': 21, 'Hindi': 20}</td>\n",
952
+ " <td>{'Maths': 22, 'Hindi': 25}</td>\n",
953
+ " </tr>\n",
954
+ " </tbody>\n",
955
+ "</table>\n",
956
+ "</div>"
957
+ ],
958
+ "text/plain": [
959
+ " Name marks.Sem1 marks.Sem2\n",
960
+ "0 p1 {'Maths': 21, 'Hindi': 20} {'Maths': 22, 'Hindi': 25}"
961
+ ]
962
+ },
963
+ "execution_count": 68,
964
+ "metadata": {},
965
+ "output_type": "execute_result"
966
+ }
967
+ ],
968
+ "source": [
969
+ "pd.json_normalize(x,max_level=1)"
970
+ ]
971
+ },
972
+ {
973
+ "cell_type": "code",
974
+ "execution_count": 70,
975
+ "id": "4f1595f1-4602-4126-9d96-5637cd5139ec",
976
+ "metadata": {},
977
+ "outputs": [
978
+ {
979
+ "data": {
980
+ "text/html": [
981
+ "<div>\n",
982
+ "<style scoped>\n",
983
+ " .dataframe tbody tr th:only-of-type {\n",
984
+ " vertical-align: middle;\n",
985
+ " }\n",
986
+ "\n",
987
+ " .dataframe tbody tr th {\n",
988
+ " vertical-align: top;\n",
989
+ " }\n",
990
+ "\n",
991
+ " .dataframe thead th {\n",
992
+ " text-align: right;\n",
993
+ " }\n",
994
+ "</style>\n",
995
+ "<table border=\"1\" class=\"dataframe\">\n",
996
+ " <thead>\n",
997
+ " <tr style=\"text-align: right;\">\n",
998
+ " <th></th>\n",
999
+ " <th>Name</th>\n",
1000
+ " <th>marks.Sem1.Maths</th>\n",
1001
+ " <th>marks.Sem1.Hindi</th>\n",
1002
+ " <th>marks.Sem2.Maths</th>\n",
1003
+ " <th>marks.Sem2.Hindi</th>\n",
1004
+ " </tr>\n",
1005
+ " </thead>\n",
1006
+ " <tbody>\n",
1007
+ " <tr>\n",
1008
+ " <th>0</th>\n",
1009
+ " <td>p1</td>\n",
1010
+ " <td>21</td>\n",
1011
+ " <td>20</td>\n",
1012
+ " <td>22</td>\n",
1013
+ " <td>25</td>\n",
1014
+ " </tr>\n",
1015
+ " </tbody>\n",
1016
+ "</table>\n",
1017
+ "</div>"
1018
+ ],
1019
+ "text/plain": [
1020
+ " Name marks.Sem1.Maths marks.Sem1.Hindi marks.Sem2.Maths marks.Sem2.Hindi\n",
1021
+ "0 p1 21 20 22 25"
1022
+ ]
1023
+ },
1024
+ "execution_count": 70,
1025
+ "metadata": {},
1026
+ "output_type": "execute_result"
1027
+ }
1028
+ ],
1029
+ "source": [
1030
+ "pd.json_normalize(x,max_level=2)"
1031
+ ]
1032
+ },
1033
+ {
1034
+ "cell_type": "code",
1035
+ "execution_count": 78,
1036
+ "id": "80e39602-f792-4f76-82b7-956125ec2101",
1037
+ "metadata": {},
1038
+ "outputs": [],
1039
+ "source": [
1040
+ "x = {\"Name\":{\"p1\":12},\"marks\":[{\"Sem1\":20,\"Sem2\":30}],\"Age\":{\"a\":{\"b\":1}}}"
1041
+ ]
1042
+ },
1043
+ {
1044
+ "cell_type": "code",
1045
+ "execution_count": 80,
1046
+ "id": "53a1d40b-a256-46c4-bc3d-0d212cea9a69",
1047
+ "metadata": {},
1048
+ "outputs": [
1049
+ {
1050
+ "data": {
1051
+ "text/html": [
1052
+ "<div>\n",
1053
+ "<style scoped>\n",
1054
+ " .dataframe tbody tr th:only-of-type {\n",
1055
+ " vertical-align: middle;\n",
1056
+ " }\n",
1057
+ "\n",
1058
+ " .dataframe tbody tr th {\n",
1059
+ " vertical-align: top;\n",
1060
+ " }\n",
1061
+ "\n",
1062
+ " .dataframe thead th {\n",
1063
+ " text-align: right;\n",
1064
+ " }\n",
1065
+ "</style>\n",
1066
+ "<table border=\"1\" class=\"dataframe\">\n",
1067
+ " <thead>\n",
1068
+ " <tr style=\"text-align: right;\">\n",
1069
+ " <th></th>\n",
1070
+ " <th>Sem1</th>\n",
1071
+ " <th>Sem2</th>\n",
1072
+ " <th>Name.p1</th>\n",
1073
+ " <th>Age.a.b</th>\n",
1074
+ " </tr>\n",
1075
+ " </thead>\n",
1076
+ " <tbody>\n",
1077
+ " <tr>\n",
1078
+ " <th>0</th>\n",
1079
+ " <td>20</td>\n",
1080
+ " <td>30</td>\n",
1081
+ " <td>12</td>\n",
1082
+ " <td>1</td>\n",
1083
+ " </tr>\n",
1084
+ " </tbody>\n",
1085
+ "</table>\n",
1086
+ "</div>"
1087
+ ],
1088
+ "text/plain": [
1089
+ " Sem1 Sem2 Name.p1 Age.a.b\n",
1090
+ "0 20 30 12 1"
1091
+ ]
1092
+ },
1093
+ "execution_count": 80,
1094
+ "metadata": {},
1095
+ "output_type": "execute_result"
1096
+ }
1097
+ ],
1098
+ "source": [
1099
+ "pd.json_normalize(x,record_path=[\"marks\"],meta=[[\"Name\",\"p1\"],[\"Age\",\"a\",\"b\"]])"
1100
+ ]
1101
+ },
1102
+ {
1103
+ "cell_type": "code",
1104
+ "execution_count": null,
1105
+ "id": "f67c13e3-ef66-49ea-a7b0-b8e62f7b945d",
1106
+ "metadata": {},
1107
+ "outputs": [],
1108
+ "source": []
1109
+ }
1110
+ ],
1111
+ "metadata": {
1112
+ "kernelspec": {
1113
+ "display_name": "Python 3 (ipykernel)",
1114
+ "language": "python",
1115
+ "name": "python3"
1116
+ },
1117
+ "language_info": {
1118
+ "codemirror_mode": {
1119
+ "name": "ipython",
1120
+ "version": 3
1121
+ },
1122
+ "file_extension": ".py",
1123
+ "mimetype": "text/x-python",
1124
+ "name": "python",
1125
+ "nbconvert_exporter": "python",
1126
+ "pygments_lexer": "ipython3",
1127
+ "version": "3.11.7"
1128
+ }
1129
+ },
1130
+ "nbformat": 4,
1131
+ "nbformat_minor": 5
1132
+ }
Handling XML,HTML file data.ipynb ADDED
@@ -0,0 +1,1794 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "id": "1fa4d55b-027a-463d-832f-dead4018e035",
6
+ "metadata": {},
7
+ "source": [
8
+ "### Handling XML File Data "
9
+ ]
10
+ },
11
+ {
12
+ "cell_type": "markdown",
13
+ "id": "504872f1-a461-425a-a122-ddea07bb7217",
14
+ "metadata": {},
15
+ "source": [
16
+ "#### XML-Extensibe Markup Language"
17
+ ]
18
+ },
19
+ {
20
+ "cell_type": "code",
21
+ "execution_count": 1,
22
+ "id": "d620cb25-9e85-4366-8861-6dcec8be3698",
23
+ "metadata": {},
24
+ "outputs": [],
25
+ "source": [
26
+ "import pandas as pd"
27
+ ]
28
+ },
29
+ {
30
+ "cell_type": "markdown",
31
+ "id": "be2528d4-da70-406e-b89b-c7519abfd23b",
32
+ "metadata": {},
33
+ "source": [
34
+ "# reading XML File using Python"
35
+ ]
36
+ },
37
+ {
38
+ "cell_type": "code",
39
+ "execution_count": 22,
40
+ "id": "f0ce563f-3b6b-47e0-b7d4-8806403b0a9b",
41
+ "metadata": {},
42
+ "outputs": [
43
+ {
44
+ "data": {
45
+ "text/html": [
46
+ "<div>\n",
47
+ "<style scoped>\n",
48
+ " .dataframe tbody tr th:only-of-type {\n",
49
+ " vertical-align: middle;\n",
50
+ " }\n",
51
+ "\n",
52
+ " .dataframe tbody tr th {\n",
53
+ " vertical-align: top;\n",
54
+ " }\n",
55
+ "\n",
56
+ " .dataframe thead th {\n",
57
+ " text-align: right;\n",
58
+ " }\n",
59
+ "</style>\n",
60
+ "<table border=\"1\" class=\"dataframe\">\n",
61
+ " <thead>\n",
62
+ " <tr style=\"text-align: right;\">\n",
63
+ " <th></th>\n",
64
+ " <th>sl</th>\n",
65
+ " <th>sw</th>\n",
66
+ " <th>pl</th>\n",
67
+ " <th>label</th>\n",
68
+ " </tr>\n",
69
+ " </thead>\n",
70
+ " <tbody>\n",
71
+ " <tr>\n",
72
+ " <th>0</th>\n",
73
+ " <td>1.2</td>\n",
74
+ " <td>3.4</td>\n",
75
+ " <td>2.5</td>\n",
76
+ " <td>setosa</td>\n",
77
+ " </tr>\n",
78
+ " <tr>\n",
79
+ " <th>1</th>\n",
80
+ " <td>2.5</td>\n",
81
+ " <td>2.9</td>\n",
82
+ " <td>3.6</td>\n",
83
+ " <td>verginica</td>\n",
84
+ " </tr>\n",
85
+ " <tr>\n",
86
+ " <th>2</th>\n",
87
+ " <td>3.6</td>\n",
88
+ " <td>1.8</td>\n",
89
+ " <td>4.5</td>\n",
90
+ " <td>versicolor</td>\n",
91
+ " </tr>\n",
92
+ " </tbody>\n",
93
+ "</table>\n",
94
+ "</div>"
95
+ ],
96
+ "text/plain": [
97
+ " sl sw pl label\n",
98
+ "0 1.2 3.4 2.5 setosa\n",
99
+ "1 2.5 2.9 3.6 verginica\n",
100
+ "2 3.6 1.8 4.5 versicolor"
101
+ ]
102
+ },
103
+ "execution_count": 22,
104
+ "metadata": {},
105
+ "output_type": "execute_result"
106
+ }
107
+ ],
108
+ "source": [
109
+ "pd.read_xml(\"flower.xml\",xpath=\"flower\")"
110
+ ]
111
+ },
112
+ {
113
+ "cell_type": "code",
114
+ "execution_count": 24,
115
+ "id": "997d628b-969c-4fe8-a0ae-7632f425090e",
116
+ "metadata": {},
117
+ "outputs": [
118
+ {
119
+ "data": {
120
+ "text/html": [
121
+ "<div>\n",
122
+ "<style scoped>\n",
123
+ " .dataframe tbody tr th:only-of-type {\n",
124
+ " vertical-align: middle;\n",
125
+ " }\n",
126
+ "\n",
127
+ " .dataframe tbody tr th {\n",
128
+ " vertical-align: top;\n",
129
+ " }\n",
130
+ "\n",
131
+ " .dataframe thead th {\n",
132
+ " text-align: right;\n",
133
+ " }\n",
134
+ "</style>\n",
135
+ "<table border=\"1\" class=\"dataframe\">\n",
136
+ " <thead>\n",
137
+ " <tr style=\"text-align: right;\">\n",
138
+ " <th></th>\n",
139
+ " <th>name</th>\n",
140
+ " <th>age</th>\n",
141
+ " </tr>\n",
142
+ " </thead>\n",
143
+ " <tbody>\n",
144
+ " <tr>\n",
145
+ " <th>0</th>\n",
146
+ " <td>p1</td>\n",
147
+ " <td>85</td>\n",
148
+ " </tr>\n",
149
+ " <tr>\n",
150
+ " <th>1</th>\n",
151
+ " <td>p2</td>\n",
152
+ " <td>90</td>\n",
153
+ " </tr>\n",
154
+ " </tbody>\n",
155
+ "</table>\n",
156
+ "</div>"
157
+ ],
158
+ "text/plain": [
159
+ " name age\n",
160
+ "0 p1 85\n",
161
+ "1 p2 90"
162
+ ]
163
+ },
164
+ "execution_count": 24,
165
+ "metadata": {},
166
+ "output_type": "execute_result"
167
+ }
168
+ ],
169
+ "source": [
170
+ "pd.read_xml(\"flower.xml\",xpath=\"farmer\")"
171
+ ]
172
+ },
173
+ {
174
+ "cell_type": "code",
175
+ "execution_count": 28,
176
+ "id": "ed0e6cfc-29f9-4857-8f59-f54a182fe9f0",
177
+ "metadata": {},
178
+ "outputs": [
179
+ {
180
+ "data": {
181
+ "text/html": [
182
+ "<div>\n",
183
+ "<style scoped>\n",
184
+ " .dataframe tbody tr th:only-of-type {\n",
185
+ " vertical-align: middle;\n",
186
+ " }\n",
187
+ "\n",
188
+ " .dataframe tbody tr th {\n",
189
+ " vertical-align: top;\n",
190
+ " }\n",
191
+ "\n",
192
+ " .dataframe thead th {\n",
193
+ " text-align: right;\n",
194
+ " }\n",
195
+ "</style>\n",
196
+ "<table border=\"1\" class=\"dataframe\">\n",
197
+ " <thead>\n",
198
+ " <tr style=\"text-align: right;\">\n",
199
+ " <th></th>\n",
200
+ " <th>c_name</th>\n",
201
+ " <th>city_name</th>\n",
202
+ " </tr>\n",
203
+ " </thead>\n",
204
+ " <tbody>\n",
205
+ " <tr>\n",
206
+ " <th>0</th>\n",
207
+ " <td>India</td>\n",
208
+ " <td>Hyderabad</td>\n",
209
+ " </tr>\n",
210
+ " <tr>\n",
211
+ " <th>1</th>\n",
212
+ " <td>America</td>\n",
213
+ " <td>california</td>\n",
214
+ " </tr>\n",
215
+ " </tbody>\n",
216
+ "</table>\n",
217
+ "</div>"
218
+ ],
219
+ "text/plain": [
220
+ " c_name city_name\n",
221
+ "0 India Hyderabad\n",
222
+ "1 America california"
223
+ ]
224
+ },
225
+ "execution_count": 28,
226
+ "metadata": {},
227
+ "output_type": "execute_result"
228
+ }
229
+ ],
230
+ "source": [
231
+ "pd.read_xml(\"flower.xml\",xpath=\"country\")"
232
+ ]
233
+ },
234
+ {
235
+ "cell_type": "code",
236
+ "execution_count": 30,
237
+ "id": "824fb54a-aee5-472a-91ba-a2b6e881c451",
238
+ "metadata": {},
239
+ "outputs": [],
240
+ "source": [
241
+ "data =pd.read_xml(\"flower.xml\",xpath=\"flower\")"
242
+ ]
243
+ },
244
+ {
245
+ "cell_type": "code",
246
+ "execution_count": 32,
247
+ "id": "666e1306-4efd-4c79-9af1-99542643a761",
248
+ "metadata": {},
249
+ "outputs": [
250
+ {
251
+ "data": {
252
+ "text/html": [
253
+ "<div>\n",
254
+ "<style scoped>\n",
255
+ " .dataframe tbody tr th:only-of-type {\n",
256
+ " vertical-align: middle;\n",
257
+ " }\n",
258
+ "\n",
259
+ " .dataframe tbody tr th {\n",
260
+ " vertical-align: top;\n",
261
+ " }\n",
262
+ "\n",
263
+ " .dataframe thead th {\n",
264
+ " text-align: right;\n",
265
+ " }\n",
266
+ "</style>\n",
267
+ "<table border=\"1\" class=\"dataframe\">\n",
268
+ " <thead>\n",
269
+ " <tr style=\"text-align: right;\">\n",
270
+ " <th></th>\n",
271
+ " <th>sl</th>\n",
272
+ " <th>sw</th>\n",
273
+ " <th>pl</th>\n",
274
+ " <th>label</th>\n",
275
+ " </tr>\n",
276
+ " </thead>\n",
277
+ " <tbody>\n",
278
+ " <tr>\n",
279
+ " <th>0</th>\n",
280
+ " <td>1.2</td>\n",
281
+ " <td>3.4</td>\n",
282
+ " <td>2.5</td>\n",
283
+ " <td>setosa</td>\n",
284
+ " </tr>\n",
285
+ " <tr>\n",
286
+ " <th>1</th>\n",
287
+ " <td>2.5</td>\n",
288
+ " <td>2.9</td>\n",
289
+ " <td>3.6</td>\n",
290
+ " <td>verginica</td>\n",
291
+ " </tr>\n",
292
+ " <tr>\n",
293
+ " <th>2</th>\n",
294
+ " <td>3.6</td>\n",
295
+ " <td>1.8</td>\n",
296
+ " <td>4.5</td>\n",
297
+ " <td>versicolor</td>\n",
298
+ " </tr>\n",
299
+ " </tbody>\n",
300
+ "</table>\n",
301
+ "</div>"
302
+ ],
303
+ "text/plain": [
304
+ " sl sw pl label\n",
305
+ "0 1.2 3.4 2.5 setosa\n",
306
+ "1 2.5 2.9 3.6 verginica\n",
307
+ "2 3.6 1.8 4.5 versicolor"
308
+ ]
309
+ },
310
+ "execution_count": 32,
311
+ "metadata": {},
312
+ "output_type": "execute_result"
313
+ }
314
+ ],
315
+ "source": [
316
+ "data"
317
+ ]
318
+ },
319
+ {
320
+ "cell_type": "code",
321
+ "execution_count": 34,
322
+ "id": "1ab64f68-0174-4fae-b028-3c32b0fa37dd",
323
+ "metadata": {},
324
+ "outputs": [],
325
+ "source": [
326
+ "data.to_xml(\"flower1.xml\")"
327
+ ]
328
+ },
329
+ {
330
+ "cell_type": "code",
331
+ "execution_count": 38,
332
+ "id": "7c486d90-5a93-47e6-9356-71c5b1b94121",
333
+ "metadata": {},
334
+ "outputs": [],
335
+ "source": [
336
+ "data.to_xml(\"flower12.xml\",attr_cols=[\"sl\",\"sw\",\"pl\",\"label\"])"
337
+ ]
338
+ },
339
+ {
340
+ "cell_type": "code",
341
+ "execution_count": 42,
342
+ "id": "71d4bf11-d6e8-4e5b-a2aa-6e41bff7224b",
343
+ "metadata": {},
344
+ "outputs": [],
345
+ "source": [
346
+ "data.to_xml(\"flower123.xml\",elem_cols=[\"sl\",\"sw\",\"pl\",\"label\"])"
347
+ ]
348
+ },
349
+ {
350
+ "cell_type": "code",
351
+ "execution_count": null,
352
+ "id": "eb72ab7b-2fe2-4a9a-b992-8a81ab462011",
353
+ "metadata": {},
354
+ "outputs": [],
355
+ "source": [
356
+ "# Reading Html File Using Python"
357
+ ]
358
+ },
359
+ {
360
+ "cell_type": "code",
361
+ "execution_count": 46,
362
+ "id": "119dd88a-ecc7-4407-84fd-5830eb7c56e4",
363
+ "metadata": {},
364
+ "outputs": [],
365
+ "source": [
366
+ "d =pd.read_html(\"https://en.wikipedia.org/wiki/Indian_Premier_League\")"
367
+ ]
368
+ },
369
+ {
370
+ "cell_type": "code",
371
+ "execution_count": 47,
372
+ "id": "969787d7-578d-4632-afb8-0d61ab75b16f",
373
+ "metadata": {},
374
+ "outputs": [
375
+ {
376
+ "data": {
377
+ "text/plain": [
378
+ "[ 0 1\n",
379
+ " 0 NaN NaN\n",
380
+ " 1 Countries India\n",
381
+ " 2 Administrator Board of Control for Cricket in India (BCCI)\n",
382
+ " 3 Headquarters Cricket Centre, Churchgate, Mumbai, Maharashtra\n",
383
+ " 4 Format Twenty20\n",
384
+ " 5 First edition 2008\n",
385
+ " 6 Latest edition 2024\n",
386
+ " 7 Next edition 2025\n",
387
+ " 8 Tournament format Round-robin format with group system and playoffs\n",
388
+ " 9 Number of teams 10\n",
389
+ " 10 Current champion Kolkata Knight Riders (3rd title)\n",
390
+ " 11 Most successful Chennai Super Kings Mumbai Indians (5 titles e...\n",
391
+ " 12 Most runs Virat Kohli (8,004)\n",
392
+ " 13 Most wickets Yuzvendra Chahal (205)\n",
393
+ " 14 TV India Star Sports (TV)[1] JioCinema (Internet)...\n",
394
+ " 15 Website iplt20.com,\n",
395
+ " Seasons\n",
396
+ " 0 2008 2009 2010 2011 2012 2013 2014 2015 2016 2...,\n",
397
+ " Season Winners\n",
398
+ " 0 2008 Rajasthan Royals\n",
399
+ " 1 2009 Deccan Chargers\n",
400
+ " 2 2010 Chennai Super Kings\n",
401
+ " 3 2011 Chennai Super Kings (2)\n",
402
+ " 4 2012 Kolkata Knight Riders\n",
403
+ " 5 2013 Mumbai Indians\n",
404
+ " 6 2014 Kolkata Knight Riders (2)\n",
405
+ " 7 2015 Mumbai Indians (2)\n",
406
+ " 8 2016 Sunrisers Hyderabad\n",
407
+ " 9 2017 Mumbai Indians (3)\n",
408
+ " 10 2018 Chennai Super Kings (3)\n",
409
+ " 11 2019 Mumbai Indians (4)\n",
410
+ " 12 2020 Mumbai Indians (5)\n",
411
+ " 13 2021 Chennai Super Kings (4)\n",
412
+ " 14 2022 Gujarat Titans\n",
413
+ " 15 2023 Chennai Super Kings (5)\n",
414
+ " 16 2024 Kolkata Knight Riders (3),\n",
415
+ " Indian Premier League CPL \\\n",
416
+ " 0 Chennai Super Kings NaN \n",
417
+ " 1 Delhi Capitals NaN \n",
418
+ " 2 Gujarat Titans NaN \n",
419
+ " 3 Kolkata Knight Riders Trinbago Knight Riders \n",
420
+ " 4 Lucknow Super Giants NaN \n",
421
+ " 5 Mumbai Indians NaN \n",
422
+ " 6 Punjab Kings Saint Lucia Kings \n",
423
+ " 7 Rajasthan Royals Barbados Royals \n",
424
+ " 8 Royal Challengers Bengaluru NaN \n",
425
+ " 9 Sunrisers Hyderabad NaN \n",
426
+ " \n",
427
+ " SA20 ILT MLC \n",
428
+ " 0 Joburg Super Kings NaN Texas Super Kings \n",
429
+ " 1 Pretoria Capitals Dubai Capitals NaN \n",
430
+ " 2 NaN NaN NaN \n",
431
+ " 3 NaN Abu Dhabi Knight Riders Los Angeles Knight Riders \n",
432
+ " 4 Durban's Super Giants NaN NaN \n",
433
+ " 5 MI Cape Town MI Emirates MI New York \n",
434
+ " 6 NaN NaN NaN \n",
435
+ " 7 Paarl Royals NaN NaN \n",
436
+ " 8 NaN NaN NaN \n",
437
+ " 9 Sunrisers Eastern Cape NaN NaN ,\n",
438
+ " Player IPL team Salary\n",
439
+ " 0 Mitchell Starc Kolkata Knight Riders (KKR) Rs 24.75 Crore\n",
440
+ " 1 Pat Cummins Sunrisers Hyderabad (SRH) Rs 20.50 Crore\n",
441
+ " 2 Daryl Mitchell Chennai Super Kings (CSK) Rs 14 Crore\n",
442
+ " 3 Harshal Patel Punjab Kings (PBKS) Rs 11.75 Crore\n",
443
+ " 4 Alzarri Joseph Royal Challengers Bengaluru (RCB) Rs 11.50 Crore\n",
444
+ " 5 Spencer Johnson Gujarat Titans (GT) Rs 10 Crore\n",
445
+ " 6 Sameer Rizvi Chennai Super Kings (CSK) Rs 8.40 Crore\n",
446
+ " 7 Rilee Rossouw Punjab Kings (PBKS) Rs 8 Crore\n",
447
+ " 8 Rovman Powell Rajasthan Royals (RR) Rs 7.40 Crore\n",
448
+ " 9 Shahrukh Khan Gujarat Titans (GT) Rs 7.40 Crore\n",
449
+ " 10 Total Total Rs 123.7 Crore\n",
450
+ " 11 Average Salary Average Salary Rs 12.37 Crore,\n",
451
+ " 0 1\n",
452
+ " 0 NaN This section does not cite any sources. Please...,\n",
453
+ " Team Team.1 City \\\n",
454
+ " 0 NaN Chennai Super Kings Chennai, Tamil Nadu \n",
455
+ " 1 NaN Delhi Capitals New Delhi, Delhi \n",
456
+ " 2 NaN Gujarat Titans Ahmedabad, Gujarat \n",
457
+ " 3 NaN Kolkata Knight Riders Kolkata, West Bengal \n",
458
+ " 4 NaN Lucknow Super Giants Lucknow, Uttar Pradesh \n",
459
+ " 5 NaN Mumbai Indians Mumbai, Maharashtra \n",
460
+ " 6 NaN Punjab Kings Mullanpur, Punjab \n",
461
+ " 7 NaN Rajasthan Royals Jaipur, Rajasthan \n",
462
+ " 8 NaN Royal Challengers Bengaluru Bangalore, Karnataka \n",
463
+ " 9 NaN Sunrisers Hyderabad Hyderabad, Telangana \n",
464
+ " \n",
465
+ " Home ground Debut Captain \\\n",
466
+ " 0 M. A. Chidambaram Stadium 2008 Ruturaj Gaikwad \n",
467
+ " 1 Arun Jaitley Stadium 2008 NaN \n",
468
+ " 2 Narendra Modi Stadium 2022 Shubman Gill \n",
469
+ " 3 Eden Gardens 2008 NaN \n",
470
+ " 4 BRSABV Ekana Stadium 2022 NaN \n",
471
+ " 5 Wankhede Stadium 2008 Hardik Pandya \n",
472
+ " 6 Maharaja Yadavindra Singh International Cricke... 2008 NaN \n",
473
+ " 7 Sawai Mansingh Stadium 2008 Sanju Samson \n",
474
+ " 8 M. Chinnaswamy Stadium 2008 NaN \n",
475
+ " 9 Rajiv Gandhi Stadium 2013 Pat Cummins \n",
476
+ " \n",
477
+ " Head coach Owner(s) \n",
478
+ " 0 Stephen Fleming N. Srinivasan \n",
479
+ " 1 Hemang Badani Grandhi Mallikarjuna Rao Sajjan Jindal \n",
480
+ " 2 Ashish Nehra Siddharth Patel \n",
481
+ " 3 Chandrakant Pandit Shah Rukh Khan Juhi Chawla Jay Mehta \n",
482
+ " 4 Justin Langer Sanjiv Goenka \n",
483
+ " 5 Mahela Jayawardene Mukesh Ambani \n",
484
+ " 6 Ricky Ponting Mohit Burman Ness Wadia Preity Zinta Karan Paul \n",
485
+ " 7 Rahul Dravid Manoj Badale Lachlan Murdoch Gerry Cardinale \n",
486
+ " 8 Andy Flower Hina Nagarajan \n",
487
+ " 9 Daniel Vettori Kalanithi Maran ,\n",
488
+ " Team City State \\\n",
489
+ " 0 Deccan Chargers Hyderabad Andhra Pradesh[75] \n",
490
+ " 1 Kochi Tuskers Kerala Kochi Kerala \n",
491
+ " 2 Pune Warriors India Pune Maharashtra \n",
492
+ " 3 Rising Pune Supergiant Pune Maharashtra \n",
493
+ " 4 Gujarat Lions Rajkot Gujarat \n",
494
+ " \n",
495
+ " Home ground Debut Dissolved \\\n",
496
+ " 0 Rajiv Gandhi Stadium 2008 2012 \n",
497
+ " 1 Jawaharlal Nehru Stadium 2011 2011 \n",
498
+ " 2 Maharashtra Cricket Association Stadium 2011 2013 \n",
499
+ " 3 Maharashtra Cricket Association Stadium 2016 2018 \n",
500
+ " 4 Saurashtra Cricket Association Stadium 2016 2018 \n",
501
+ " \n",
502
+ " Owner(s) \n",
503
+ " 0 Deccan Chronicle \n",
504
+ " 1 Kochi Cricket Pvt Ltd \n",
505
+ " 2 Sahara India Pariwar \n",
506
+ " 3 RP-Sanjiv Goenka Group \n",
507
+ " 4 Intex Technologies ,\n",
508
+ " Team Title(s) Runner-up \\\n",
509
+ " 0 Chennai Super Kings 5 5 \n",
510
+ " 1 Mumbai Indians 5 1 \n",
511
+ " 2 Kolkata Knight Riders 3 1 \n",
512
+ " 3 Sunrisers Hyderabad 1 2 \n",
513
+ " 4 Rajasthan Royals 1 1 \n",
514
+ " 5 Gujarat Titans 1 1 \n",
515
+ " 6 Deccan Chargers† 1 – \n",
516
+ " 7 Royal Challengers Bengaluru – 3 \n",
517
+ " 8 Delhi Capitals – 1 \n",
518
+ " 9 Punjab Kings – 1 \n",
519
+ " 10 Rising Pune Supergiant† – 1 \n",
520
+ " 11 – – NaN \n",
521
+ " \n",
522
+ " Seasons won Seasons runner-up \\\n",
523
+ " 0 2010, 2011, 2018, 2021, 2023 2008, 2012, 2013, 2015, 2019 \n",
524
+ " 1 2013, 2015, 2017, 2019, 2020 2010 \n",
525
+ " 2 2012, 2014, 2024 2021 \n",
526
+ " 3 2016 2018, 2024 \n",
527
+ " 4 2008 2022 \n",
528
+ " 5 2022 2023 \n",
529
+ " 6 2009 – \n",
530
+ " 7 – 2009, 2011, 2016 \n",
531
+ " 8 – 2020 \n",
532
+ " 9 – 2014 \n",
533
+ " 10 – 2017 \n",
534
+ " 11 NaN NaN \n",
535
+ " \n",
536
+ " No. of playoffs played No. of seasons played \n",
537
+ " 0 12.0 15.0 \n",
538
+ " 1 10.0 17.0 \n",
539
+ " 2 8.0 17.0 \n",
540
+ " 3 7.0 12.0 \n",
541
+ " 4 6.0 15.0 \n",
542
+ " 5 2.0 3.0 \n",
543
+ " 6 2.0 5.0 \n",
544
+ " 7 9.0 17.0 \n",
545
+ " 8 6.0 17.0 \n",
546
+ " 9 2.0 17.0 \n",
547
+ " 10 1.0 2.0 \n",
548
+ " 11 NaN NaN ,\n",
549
+ " Year Final \\\n",
550
+ " Year Winner \n",
551
+ " 0 2008 Rajasthan Royals 164/7 (20 overs) \n",
552
+ " 1 2009 Deccan Chargers 143/6 (20 overs) \n",
553
+ " 2 2010 Chennai Super Kings 168/5 (20 overs) \n",
554
+ " 3 2011 Chennai Super Kings 205/5 (20 overs) \n",
555
+ " 4 2012 Kolkata Knight Riders 192/5 (19.4 overs) \n",
556
+ " 5 2013 Mumbai Indians 148/9 (20 overs) \n",
557
+ " 6 2014 Kolkata Knight Riders 200/7 (19.3 overs) \n",
558
+ " 7 2015 Mumbai Indians 202/5 (20 overs) \n",
559
+ " 8 2016 Sunrisers Hyderabad 208/7 (20 overs) \n",
560
+ " 9 2017 Mumbai Indians 129/8 (20 overs) \n",
561
+ " 10 2018 Chennai Super Kings 181/2 (18.3 overs) \n",
562
+ " 11 2019 Mumbai Indians 149/8 (20 overs) \n",
563
+ " 12 2020 Mumbai Indians 157/5 (18.4 overs) \n",
564
+ " 13 2021 Chennai Super Kings 192/3 (20 overs) \n",
565
+ " 14 2022 Gujarat Titans 133/3 (18.1 overs) \n",
566
+ " 15 2023 Chennai Super Kings 171/5 (15 overs) \n",
567
+ " 16 2024 Kolkata Knight Riders 114/2 (10.3 overs) \n",
568
+ " \n",
569
+ " \\\n",
570
+ " Result \n",
571
+ " 0 RR won by 3 wickets (scorecard) \n",
572
+ " 1 DEC won by 6 runs (scorecard) \n",
573
+ " 2 CSK won by 22 runs (scorecard) \n",
574
+ " 3 CSK won by 58 runs (scorecard) \n",
575
+ " 4 KKR won by 5 wickets (scorecard) \n",
576
+ " 5 MI won by 23 runs (scorecard) \n",
577
+ " 6 KKR won by 3 wickets (scorecard) \n",
578
+ " 7 MI won by 41 runs (scorecard) \n",
579
+ " 8 SRH won by 8 runs (scorecard) \n",
580
+ " 9 MI won by 1 run (scorecard) \n",
581
+ " 10 CSK won by 8 wickets (scorecard) \n",
582
+ " 11 MI won by 1 run (scorecard) \n",
583
+ " 12 MI won by 5 wickets (scorecard) \n",
584
+ " 13 CSK won by 27 runs (scorecard) \n",
585
+ " 14 GT won by 7 wickets (scorecard) \n",
586
+ " 15 CSK won by 5 wickets (DLS-method) (scorecard) \n",
587
+ " 16 KKR won by 8 wickets (scorecard) \n",
588
+ " \n",
589
+ " \\\n",
590
+ " Runner-up \n",
591
+ " 0 Chennai Super Kings 163/5 (20 overs) \n",
592
+ " 1 Royal Challengers Bangalore 137/9 (20 overs) \n",
593
+ " 2 Mumbai Indians 146/9 (20 overs) \n",
594
+ " 3 Royal Challengers Bangalore 147/8 (20 overs) \n",
595
+ " 4 Chennai Super Kings 190/3 (20 overs) \n",
596
+ " 5 Chennai Super Kings 125/9 (20 overs) \n",
597
+ " 6 Kings XI Punjab 199/4 (20 overs) \n",
598
+ " 7 Chennai Super Kings 161/8 (20 overs) \n",
599
+ " 8 Royal Challengers Bangalore 200/7 (20 overs) \n",
600
+ " 9 Rising Pune Supergiant 128/6 (20 overs) \n",
601
+ " 10 Sunrisers Hyderabad 178/6 (20 overs) \n",
602
+ " 11 Chennai Super Kings 148/7 (20 overs) \n",
603
+ " 12 Delhi Capitals 156/7 (20 overs) \n",
604
+ " 13 Kolkata Knight Riders 165/9 (20 overs) \n",
605
+ " 14 Rajasthan Royals 130/9 (20 overs) \n",
606
+ " 15 Gujarat Titans 214/4 (20 overs) \n",
607
+ " 16 Sunrisers Hyderabad 113/10 (18.3 overs) \n",
608
+ " \n",
609
+ " Final venue Player of the season \n",
610
+ " Final venue Player of the season \n",
611
+ " 0 DY Patil Stadium, Navi Mumbai Shane Watson (RR) \n",
612
+ " 1 Wanderers Stadium, Johannesburg Adam Gilchrist (DEC) \n",
613
+ " 2 DY Patil Stadium, Navi Mumbai Sachin Tendulkar (MI) \n",
614
+ " 3 M. A. Chidambaram Stadium, Chennai Chris Gayle (RCB) \n",
615
+ " 4 M. A. Chidambaram Stadium, Chennai Sunil Narine (KKR) \n",
616
+ " 5 Eden Gardens, Kolkata Shane Watson (RR) \n",
617
+ " 6 M. Chinnaswamy Stadium, Bengaluru Glenn Maxwell (KXIP) \n",
618
+ " 7 Eden Gardens, Kolkata Andre Russell (KKR) \n",
619
+ " 8 M. Chinnaswamy Stadium, Bengaluru Virat Kohli (RCB) \n",
620
+ " 9 Rajiv Gandhi Stadium, Hyderabad Ben Stokes (RPS) \n",
621
+ " 10 Wankhede Stadium, Mumbai Sunil Narine (KKR) \n",
622
+ " 11 Rajiv Gandhi Stadium, Hyderabad Andre Russell (KKR) \n",
623
+ " 12 Dubai International Cricket Stadium, Dubai Jofra Archer (RR) \n",
624
+ " 13 Dubai International Cricket Stadium, Dubai Harshal Patel (RCB) \n",
625
+ " 14 Narendra Modi Stadium, Ahmedabad Jos Buttler (RR) \n",
626
+ " 15 Narendra Modi Stadium, Ahmedabad Shubman Gill (GT) \n",
627
+ " 16 M. A. Chidambaram Stadium, Chennai Sunil Narine (KKR) ,\n",
628
+ " Season (No. of teams) 2008 (8) 2009 (8) 2010 (8) \\\n",
629
+ " 0 Chennai Super Kings RU SF C \n",
630
+ " 1 Delhi Capitals / Delhi Daredevils SF SF 5th \n",
631
+ " 2 Gujarat Titans – – – \n",
632
+ " 3 Kolkata Knight Riders 6th 8th 6th \n",
633
+ " 4 Lucknow Super Giants – – – \n",
634
+ " 5 Mumbai Indians 5th 7th RU \n",
635
+ " 6 Punjab Kings / Kings XI Punjab SF 5th 8th \n",
636
+ " 7 Rajasthan Royals C 6th 7th \n",
637
+ " 8 Royal Challengers Bengaluru 7th RU 3rd \n",
638
+ " 9 Deccan Chargers / Sunrisers Hyderabad 8th C 4th \n",
639
+ " 10 Kochi Tuskers Kerala† – – – \n",
640
+ " 11 Pune Warriors / Pune Warriors India† – – – \n",
641
+ " 12 Gujarat Lions† – – – \n",
642
+ " 13 Rising Pune Supergiant† – – – \n",
643
+ " \n",
644
+ " 2011 (10) 2012 (9) 2013 (9) 2014 (8) 2015 (8) 2016 (8) 2017 (8) \\\n",
645
+ " 0 C RU RU PO RU Suspended Suspended \n",
646
+ " 1 10th PO 9th 8th 7th 6th 6th \n",
647
+ " 2 – – – – – – – \n",
648
+ " 3 PO C 7th C 5th PO PO \n",
649
+ " 4 – – – – – – – \n",
650
+ " 5 PO PO C PO C 5th C \n",
651
+ " 6 5th 6th 6th RU 8th 8th 5th \n",
652
+ " 7 6th 7th PO 5th PO Suspended Suspended \n",
653
+ " 8 RU 5th 5th 7th PO RU 8th \n",
654
+ " 9 7th 8th PO 6th 6th C PO \n",
655
+ " 10 8th – – – – – – \n",
656
+ " 11 9th 9th 8th – – – – \n",
657
+ " 12 – – – – – PO 7th \n",
658
+ " 13 – – – – – 7th RU \n",
659
+ " \n",
660
+ " 2018 (8) 2019 (8) 2020 (8) 2021 (8) 2022 (10) 2023 (10) 2024 (10) \n",
661
+ " 0 C RU 7th C 9th C 5th \n",
662
+ " 1 8th PO RU PO 5th 9th 6th \n",
663
+ " 2 – – – – C RU 8th \n",
664
+ " 3 PO 5th 5th RU 7th 7th C \n",
665
+ " 4 – – – – PO PO 7th \n",
666
+ " 5 5th C C 5th 10th PO 10th \n",
667
+ " 6 7th 6th 6th 6th 6th 8th 9th \n",
668
+ " 7 PO 7th 8th 7th RU 5th PO \n",
669
+ " 8 6th 8th PO PO PO 6th PO \n",
670
+ " 9 RU PO PO 8th 8th 10th RU \n",
671
+ " 10 – – – – – – – \n",
672
+ " 11 – – – – – – – \n",
673
+ " 12 – – – – – – – \n",
674
+ " 13 – – – – – – – ,\n",
675
+ " Year 1st 2nd 3rd 4th 5th 6th 7th 8th 9th \\\n",
676
+ " 0 2008 RR (C) KXIP CSK (R) DD MI KKR RCB DCH NaN \n",
677
+ " 1 2009 DD CSK RCB (R) DCH (C) KXIP RR MI KKR NaN \n",
678
+ " 2 2010 MI (R) DCH CSK (C) RCB DD KKR RR KXIP NaN \n",
679
+ " 3 2011 RCB (R) CSK (C) MI KKR KXIP RR DCH KTK PWI \n",
680
+ " 4 2012 DD KKR (C) MI CSK (R) RCB KXIP RR DCH PWI \n",
681
+ " 5 2013 CSK (R) MI (C) RR SRH RCB KXIP KKR PWI DC \n",
682
+ " 6 2014 KXIP (R) KKR (C) CSK MI RR SRH RCB DC NaN \n",
683
+ " 7 2015 CSK (R) MI (C) RCB RR KKR SRH DC KXIP NaN \n",
684
+ " 8 2016 GL RCB (R) SRH (C) KKR MI DC RPS KXIP NaN \n",
685
+ " 9 2017 MI (C) RPS (R) SRH KKR KXIP DC GL RCB NaN \n",
686
+ " 10 2018 SRH (R) CSK (C) KKR RR MI RCB KXIP DC NaN \n",
687
+ " 11 2019 MI (C) CSK (R) DC SRH KKR KXIP RR RCB NaN \n",
688
+ " 12 2020 MI (C) DC (R) SRH RCB KKR KXIP CSK RR NaN \n",
689
+ " 13 2021 DC CSK (C) RCB KKR (R) MI PBKS RR SRH NaN \n",
690
+ " 14 2022 GT (C) RR (R) LSG RCB DC PBKS KKR SRH CSK \n",
691
+ " 15 2023 GT (R) CSK (C) LSG MI RR RCB KKR PBKS DC \n",
692
+ " 16 2024 KKR (C) SRH (R) RR RCB CSK DC LSG GT KXIP \n",
693
+ " \n",
694
+ " 10th \n",
695
+ " 0 NaN \n",
696
+ " 1 NaN \n",
697
+ " 2 NaN \n",
698
+ " 3 DD \n",
699
+ " 4 NaN \n",
700
+ " 5 NaN \n",
701
+ " 6 NaN \n",
702
+ " 7 NaN \n",
703
+ " 8 NaN \n",
704
+ " 9 NaN \n",
705
+ " 10 NaN \n",
706
+ " 11 NaN \n",
707
+ " 12 NaN \n",
708
+ " 13 NaN \n",
709
+ " 14 MI \n",
710
+ " 15 SRH \n",
711
+ " 16 MI ,\n",
712
+ " Team Appearances \\\n",
713
+ " Team Total First Latest \n",
714
+ " 0 Chennai Super Kings 15 2008 2024 \n",
715
+ " 1 Mumbai Indians 17 2008 2024 \n",
716
+ " 2 Kolkata Knight Riders 17 2008 2024 \n",
717
+ " 3 Gujarat Titans 3 2022 2024 \n",
718
+ " 4 Rajasthan Royals 15 2008 2024 \n",
719
+ " 5 Sunrisers Hyderabad 12 2013 2024 \n",
720
+ " 6 Royal Challengers Bengaluru 17 2008 2024 \n",
721
+ " 7 Punjab Kings 17 2008 2024 \n",
722
+ " 8 Delhi Capitals 17 2008 2024 \n",
723
+ " 9 Lucknow Super Giants 3 2022 2024 \n",
724
+ " 10 Deccan Chargers 5 2008 2012 \n",
725
+ " 11 Rising Pune Supergiant 2 2016 2017 \n",
726
+ " 12 Gujarat Lions 2 2016 2017 \n",
727
+ " 13 Kochi Tuskers Kerala 1 2011 2011 \n",
728
+ " 14 Pune Warriors India 3 2011 2013 \n",
729
+ " \n",
730
+ " Best result Statistics \\\n",
731
+ " Best result Played Won Lost Tied+W \n",
732
+ " 0 Champions (2010, 2011, 2018, 2021, 2023) 239 138 98 0 \n",
733
+ " 1 Champions (2013, 2015, 2017, 2019, 2020) 261 142 115 2 \n",
734
+ " 2 Champions (2012, 2014, 2024) 252 130 117 1 \n",
735
+ " 3 Champions (2022) 45 28 17 0 \n",
736
+ " 4 Champions (2008) 222 110 106 2 \n",
737
+ " 5 Champions (2016) 182 87 91 1 \n",
738
+ " 6 Runners-up (2009, 2011, 2016) 256 121 128 2 \n",
739
+ " 7 Runners-up (2014) 246 109 133 3 \n",
740
+ " 8 Runners-up (2020) 252 112 134 3 \n",
741
+ " 9 Eliminator (2022, 2023) 44 24 19 0 \n",
742
+ " 10 Champions (2009) 75 29 46 0 \n",
743
+ " 11 Runners-up (2017) 30 15 15 0 \n",
744
+ " 12 Qualifier 2 (2016) 30 13 16 0 \n",
745
+ " 13 Group Stage (2011) 14 6 8 0 \n",
746
+ " 14 Group Stage (2011, 2012, 2013) 46 12 33 0 \n",
747
+ " \n",
748
+ " \n",
749
+ " Tied+L NR Win% \n",
750
+ " 0 1 2 57.74 \n",
751
+ " 1 2 0 54.40 \n",
752
+ " 2 3 0 52.40 \n",
753
+ " 3 0 0 62.22 \n",
754
+ " 4 1 2 50.91 \n",
755
+ " 5 3 0 49.17 \n",
756
+ " 6 1 4 48.61 \n",
757
+ " 7 1 0 45.12 \n",
758
+ " 8 1 2 44.44 \n",
759
+ " 9 0 1 54.54 \n",
760
+ " 10 0 0 38.66 \n",
761
+ " 11 0 0 50.00 \n",
762
+ " 12 1 0 45.00 \n",
763
+ " 13 0 0 42.85 \n",
764
+ " 14 0 1 26.67 ,\n",
765
+ " 0\n",
766
+ " 0 Team now defunct,\n",
767
+ " Batting Records Batting Records.1 \\\n",
768
+ " 0 Most runs Virat Kohli (RCB) \n",
769
+ " 1 Highest score Chris Gayle (RCB) \n",
770
+ " 2 Highest partnership Virat Kohli & AB de Villiers (RCB) \n",
771
+ " 3 Most sixes Chris Gayle (KKR/RCB/PBKS) \n",
772
+ " 4 Most fours Shikhar Dhawan\\t(DD/MI/DC/SRH/PBKS) \n",
773
+ " 5 Most centuries Virat Kohli (RCB) \n",
774
+ " 6 Most half centuries David Warner (SRH/DC) \n",
775
+ " 7 Most runs in a season Virat Kohli (RCB) \n",
776
+ " 8 Bowling Records Bowling Records \n",
777
+ " 9 Most wickets Yuzvendra Chahal (MI/RCB/RR) \n",
778
+ " 10 Best bowling average Lasith Malinga (MI) \n",
779
+ " 11 Most hat-tricks Amit Mishra (DD/DC/SRH/LSG) \n",
780
+ " 12 Best bowling figures Alzarri Joseph (MI) \n",
781
+ " 13 Most wickets in a season Harshal Patel (RCB) \n",
782
+ " 14 Most wickets in a season Dwayne Bravo (CSK) \n",
783
+ " 15 Fielding Fielding \n",
784
+ " 16 Most dismissals (wicket-keeper) MS Dhoni (CSK/RPS) \n",
785
+ " 17 Most catches (wicket-keeper) MS Dhoni (CSK/RPS) \n",
786
+ " 18 Most stumpings (wicket-keeper) MS Dhoni (CSK/RPS) \n",
787
+ " 19 Most catches (fielder) Virat Kohli (RCB) \n",
788
+ " 20 Other records Other records \n",
789
+ " 21 Most matches MS Dhoni (CSK/RPS) \n",
790
+ " 22 Most matches as captain MS Dhoni (CSK/RPS) \n",
791
+ " 23 Most matches won as captain MS Dhoni (CSK/RPS) \n",
792
+ " 24 Team records Team records \n",
793
+ " 25 Highest total Sunrisers Hyderabad \n",
794
+ " 26 Lowest total Royal Challengers Bengaluru \n",
795
+ " \n",
796
+ " Batting Records.2 \n",
797
+ " 0 8004 \n",
798
+ " 1 175* vs Pune Warriors (23 April 2013) \n",
799
+ " 2 229 vs Gujarat Lions (14 May 2016) \n",
800
+ " 3 357 \n",
801
+ " 4 768 \n",
802
+ " 5 8 \n",
803
+ " 6 66 \n",
804
+ " 7 973 (2016) \n",
805
+ " 8 Bowling Records \n",
806
+ " 9 205 \n",
807
+ " 10 19.79 (Minimum 1000 balls) \n",
808
+ " 11 3 \n",
809
+ " 12 6/12 vs Sunrisers Hyderabad (6 April 2019) \n",
810
+ " 13 32 (2021) \n",
811
+ " 14 32 (2013) \n",
812
+ " 15 Fielding \n",
813
+ " 16 190 \n",
814
+ " 17 148 \n",
815
+ " 18 42 \n",
816
+ " 19 114 \n",
817
+ " 20 Other records \n",
818
+ " 21 264 \n",
819
+ " 22 226 \n",
820
+ " 23 133 \n",
821
+ " 24 Team records \n",
822
+ " 25 287/3 (20) vs Royal Challengers Bengaluru (15 ... \n",
823
+ " 26 49 (9.4) vs Kolkata Knight Riders (23 April 2017) ,\n",
824
+ " 0 1\n",
825
+ " 0 NaN This section needs to be updated. Please help ...,\n",
826
+ " Sponsor Period Estimated annual sponsorship fee\n",
827
+ " 0 DLF 2008–2012 ₹40 crore (US$4.8 million)\n",
828
+ " 1 Pepsi 2013–2015 ₹79.2 crore (US$9.5 million)\n",
829
+ " 2 Vivo 2016, 2017 ₹100 crore (US$12.0 million)\n",
830
+ " 3 Vivo 2018, 2019, 2021 ₹440 crore (US$52.7 million)\n",
831
+ " 4 Dream11 2020 ₹222 crore (US$26.6 million)\n",
832
+ " 5 Tata 2022–2023 ₹335 crore (US$40.1 million)\n",
833
+ " 6 Tata 2024–2028 ₹500 crore (US$59.9 million)[90],\n",
834
+ " Team Year \\\n",
835
+ " Team 2023 \n",
836
+ " Team Brand value \n",
837
+ " 0 Mumbai Indians ₹9,962 crore (US$1.2 billion) \n",
838
+ " 1 Chennai Super Kings ₹8,811 crore (US$1.1 billion) \n",
839
+ " 2 Kolkata Knight Riders ₹8,428 crore (US$1.0 billion) \n",
840
+ " 3 Lucknow Super Giants ₹8,236 crore (US$986.8 million) \n",
841
+ " 4 Delhi Capitals ₹7,930 crore (US$950.2 million) \n",
842
+ " 5 Royal Challengers Bengaluru ₹7,853 crore (US$940.9 million) \n",
843
+ " 6 Rajasthan Royals ₹7,662 crore (US$918.1 million) \n",
844
+ " 7 Sunrisers Hyderabad ₹7,432 crore (US$890.5 million) \n",
845
+ " 8 Punjab Kings ₹7,087 crore (US$849.2 million) \n",
846
+ " 9 Gujarat Titans ₹6,512 crore (US$780.3 million) \n",
847
+ " \n",
848
+ " \n",
849
+ " 2022 2021 \n",
850
+ " Ref Brand value Ref Brand value Ref \n",
851
+ " 0 [110] $83M [111][112][110] $80M [111] \n",
852
+ " 1 [citation needed] $74M [111][112][110] $76M [111] \n",
853
+ " 2 [citation needed] $77M [111][112][110] $66M [111] \n",
854
+ " 3 [citation needed] $32M [111][112][110] NaN [111] \n",
855
+ " 4 [citation needed] $62M [111][112][110] $56M [111] \n",
856
+ " 5 [citation needed] $68M [111][112][110] $50M [111] \n",
857
+ " 6 [citation needed] $61M [111][112][110] $34M [111] \n",
858
+ " 7 [citation needed] $49M [111][112][110] $52M [111] \n",
859
+ " 8 [citation needed] $45M [111][112][110] $36M [111] \n",
860
+ " 9 [citation needed] $47M [111][112][110] NaN [111] ,\n",
861
+ " Territory \\\n",
862
+ " 0 India \n",
863
+ " 1 India \n",
864
+ " 2 Afghanistan \n",
865
+ " 3 Afghanistan \n",
866
+ " 4 Australia \n",
867
+ " 5 Australia \n",
868
+ " 6 Bangladesh \n",
869
+ " 7 Bangladesh \n",
870
+ " 8 Indonesia \n",
871
+ " 9 New Zealand \n",
872
+ " 10 Pakistan \n",
873
+ " 11 Ireland \n",
874
+ " 12 United Kingdom \n",
875
+ " 13 South Africa \n",
876
+ " 14 Sri Lanka \n",
877
+ " 15 Sri Lanka \n",
878
+ " 16 United States \n",
879
+ " 17 Middle East and North Africa \n",
880
+ " 18 Sub-Saharan Africa \n",
881
+ " \n",
882
+ " Channels and Online streaming Years \n",
883
+ " 0 Star Sports 1 HD Star Sports 1 Hindi HD Star S... 2024–2027 \n",
884
+ " 1 JioCinema (Internet) 2024–2027 \n",
885
+ " 2 ATN HD ATN News HD 2024 \n",
886
+ " 3 Ariana Television (Internet) 2024 \n",
887
+ " 4 Foxtel Fox Cricket Kayo Sports 2023–present[1] \n",
888
+ " 5 Kayo Freebies (Internet) 2023–present[1] \n",
889
+ " 6 T Sports HD 2024 \n",
890
+ " 7 T Sports APP 2024 \n",
891
+ " 8 Vidio (Internet) 2023[129] \n",
892
+ " 9 Colors TV 2024–present \n",
893
+ " 10 Tapmad APP 2024 \n",
894
+ " 11 Sky Sports DAZN 2023–present \n",
895
+ " 12 Sky Sports DAZN 2023–present \n",
896
+ " 13 SuperSport 2023[1] \n",
897
+ " 14 Supreme TV 2023–present \n",
898
+ " 15 The Papare.com NaN \n",
899
+ " 16 Willow TV 2023[1] \n",
900
+ " 17 Times Internet 2023[1] \n",
901
+ " 18 SuperSport 2021–present ,\n",
902
+ " 0 1\n",
903
+ " 0 NaN This section may require cleanup to meet Wikip...,\n",
904
+ " vteIndian Premier League \\\n",
905
+ " 0 Board of Control for Cricket in India Cricket ... \n",
906
+ " 1 Seasons \n",
907
+ " 2 Auctions \n",
908
+ " 3 Finals \n",
909
+ " 4 Teams and grounds (As of 2024 IPL) \n",
910
+ " 5 Chennai Super Kings \n",
911
+ " 6 Delhi Capitals \n",
912
+ " 7 Gujarat Titans \n",
913
+ " 8 Kolkata Knight Riders \n",
914
+ " 9 Lucknow Super Giants \n",
915
+ " 10 Mumbai Indians \n",
916
+ " 11 Punjab Kings \n",
917
+ " 12 Rajasthan Royals \n",
918
+ " 13 Royal Challengers Bangalore \n",
919
+ " 14 Sunrisers Hyderabad \n",
920
+ " 15 Defunct teams \n",
921
+ " 16 Statistics and records \n",
922
+ " 17 Lists \n",
923
+ " 18 Controversies \n",
924
+ " 19 Related topics \n",
925
+ " 20 Category Commons WikiProject \n",
926
+ " \n",
927
+ " vteIndian Premier League.1 \n",
928
+ " 0 Board of Control for Cricket in India Cricket ... \n",
929
+ " 1 2008 2009 2010 2011 2012 2013 2014 2015 2016 2... \n",
930
+ " 2 2008 2009 2010 2011 2012 2013 2014 2015 2016 2... \n",
931
+ " 3 2008 2009 2010 2011 2012 2013 2014 2015 2016 2... \n",
932
+ " 4 Chennai Super Kings M. A. Chidambaram Stadium ... \n",
933
+ " 5 M. A. Chidambaram Stadium \n",
934
+ " 6 Arun Jaitley Cricket Stadium ACA–VDCA Cricket ... \n",
935
+ " 7 Narendra Modi Stadium \n",
936
+ " 8 Eden Gardens \n",
937
+ " 9 Ekana Cricket Stadium \n",
938
+ " 10 Wankhede Stadium \n",
939
+ " 11 Maharaja Yadavindra Singh Stadium HPCA Stadium \n",
940
+ " 12 Sawai Mansingh Stadium ACA Stadium \n",
941
+ " 13 M. Chinnaswamy Stadium \n",
942
+ " 14 Rajiv Gandhi International Cricket Stadium \n",
943
+ " 15 Deccan Chargers Gujarat Lions Kochi Tuskers Ke... \n",
944
+ " 16 Teams Results Scores Batting Bowling Wicketkee... \n",
945
+ " 17 Awards Captains Centuries Five-wicket hauls Se... \n",
946
+ " 18 2012 spot-fixing case 2013 spot-fixing and bet... \n",
947
+ " 19 Champions League Twenty20 Lalit Modi Icon play... \n",
948
+ " 20 Category Commons WikiProject ,\n",
949
+ " 0 \\\n",
950
+ " 0 Chennai Super Kings \n",
951
+ " 1 Delhi Capitals \n",
952
+ " 2 Gujarat Titans \n",
953
+ " 3 Kolkata Knight Riders \n",
954
+ " 4 Lucknow Super Giants \n",
955
+ " 5 Mumbai Indians \n",
956
+ " 6 Punjab Kings \n",
957
+ " 7 Rajasthan Royals \n",
958
+ " 8 Royal Challengers Bangalore \n",
959
+ " 9 Sunrisers Hyderabad \n",
960
+ " 10 Defunct teams \n",
961
+ " \n",
962
+ " 1 \n",
963
+ " 0 M. A. Chidambaram Stadium \n",
964
+ " 1 Arun Jaitley Cricket Stadium ACA–VDCA Cricket ... \n",
965
+ " 2 Narendra Modi Stadium \n",
966
+ " 3 Eden Gardens \n",
967
+ " 4 Ekana Cricket Stadium \n",
968
+ " 5 Wankhede Stadium \n",
969
+ " 6 Maharaja Yadavindra Singh Stadium HPCA Stadium \n",
970
+ " 7 Sawai Mansingh Stadium ACA Stadium \n",
971
+ " 8 M. Chinnaswamy Stadium \n",
972
+ " 9 Rajiv Gandhi International Cricket Stadium \n",
973
+ " 10 Deccan Chargers Gujarat Lions Kochi Tuskers Ke... ,\n",
974
+ " Links to related articles \\\n",
975
+ " 0 vte Cricket in India BCCI Presidents Awards C.... \n",
976
+ " 1 vte Cricket in India \n",
977
+ " 2 BCCI \n",
978
+ " 3 National teams \n",
979
+ " 4 Members (teams) \n",
980
+ " .. ... \n",
981
+ " 67 East and Northeast \n",
982
+ " 68 West \n",
983
+ " 69 South \n",
984
+ " 70 Others \n",
985
+ " 71 †Defunct; ^ Proposed \n",
986
+ " \n",
987
+ " Links to related articles.1 Unnamed: 2 \n",
988
+ " 0 vte Cricket in India BCCI Presidents Awards C.... NaN \n",
989
+ " 1 vte Cricket in India NaN \n",
990
+ " 2 Presidents Awards C. K. Nayudu Award Polly Umr... NaN \n",
991
+ " 3 Men Women India A Men's U-19 Women's U-19 Blin... NaN \n",
992
+ " 4 Central Zone (Men, Women) Chhattisgarh (Men, W... NaN \n",
993
+ " .. ... ... \n",
994
+ " 67 Indrajit Namchoom Arunachal League Assam State... NaN \n",
995
+ " 68 Goa Football League Goa Women's League Gujarat... NaN \n",
996
+ " 69 Bangalore Football League‎ Bangalore Super Div... NaN \n",
997
+ " 70 Calcutta Hockey League Junior Badminton League... NaN \n",
998
+ " 71 †Defunct; ^ Proposed NaN \n",
999
+ " \n",
1000
+ " [72 rows x 3 columns],\n",
1001
+ " vte Cricket in India \\\n",
1002
+ " 0 BCCI \n",
1003
+ " 1 National teams \n",
1004
+ " 2 Members (teams) \n",
1005
+ " 3 Central Zone (Men, Women) \n",
1006
+ " 4 East Zone (Men, Women) \n",
1007
+ " 5 North Zone (Men, Women) \n",
1008
+ " 6 North East Zone (Men, Women) \n",
1009
+ " 7 South Zone (Men, Women) \n",
1010
+ " 8 West Zone (Men, Women) \n",
1011
+ " 9 Others \n",
1012
+ " 10 Tournaments \n",
1013
+ " 11 Senior \n",
1014
+ " 12 First-class \n",
1015
+ " 13 One Day \n",
1016
+ " 14 Twenty20 \n",
1017
+ " 15 State \n",
1018
+ " 16 Franchise \n",
1019
+ " 17 Regional \n",
1020
+ " 18 Youth \n",
1021
+ " 19 First-class \n",
1022
+ " 20 List A \n",
1023
+ " 21 T10 \n",
1024
+ " 22 Sports complexes \n",
1025
+ " 23 List \n",
1026
+ " 24 History of the Indian cricket team, India–Paki... \n",
1027
+ " \n",
1028
+ " vte Cricket in India.1 \n",
1029
+ " 0 Presidents Awards C. K. Nayudu Award Polly Umr... \n",
1030
+ " 1 Men Women India A Men's U-19 Women's U-19 Blin... \n",
1031
+ " 2 Central Zone (Men, Women) Chhattisgarh (Men, W... \n",
1032
+ " 3 Chhattisgarh (Men, Women) Madhya Pradesh (Men,... \n",
1033
+ " 4 Assam (Men, Women) Bengal (Men, Women) Bihar (... \n",
1034
+ " 5 Chandigarh (Men, Women) Delhi (Men, Women) Har... \n",
1035
+ " 6 Arunachal Pradesh (Men, Women) Manipur (Men, W... \n",
1036
+ " 7 Andhra (Men, Women) Hyderabad (Men, Women) Kar... \n",
1037
+ " 8 Baroda (Men, Women) Goa (Men, Women) Gujarat (... \n",
1038
+ " 9 Association of Indian Universities Cricket Clu... \n",
1039
+ " 10 SeniorFirst-class Ranji Trophy Duleep Trophy I... \n",
1040
+ " 11 First-class Ranji Trophy Duleep Trophy Irani C... \n",
1041
+ " 12 Ranji Trophy Duleep Trophy Irani Cup Senior Wo... \n",
1042
+ " 13 Deodhar Trophy Vijay Hazare Trophy Women's Sen... \n",
1043
+ " 14 State Syed Mushtaq Ali Trophy Women's Senior T... \n",
1044
+ " 15 Syed Mushtaq Ali Trophy Women's Senior T20 Tro... \n",
1045
+ " 16 Indian Premier League Women's Premier League I... \n",
1046
+ " 17 Andhra Premier League Bengal Pro T20 League De... \n",
1047
+ " 18 First-class C. K. Nayudu Trophy Cooch Behar Tr... \n",
1048
+ " 19 C. K. Nayudu Trophy Cooch Behar Trophy \n",
1049
+ " 20 Vinoo Mankad Trophy Vizzy Trophy Rohinton Bari... \n",
1050
+ " 21 Indian Street Premier League \n",
1051
+ " 22 National Cricket Academy \n",
1052
+ " 23 Coaches Captains Selectors Test wicket-keepers... \n",
1053
+ " 24 History of the Indian cricket team, India–Paki... ,\n",
1054
+ " 0 \\\n",
1055
+ " 0 Central Zone (Men, Women) \n",
1056
+ " 1 East Zone (Men, Women) \n",
1057
+ " 2 North Zone (Men, Women) \n",
1058
+ " 3 North East Zone (Men, Women) \n",
1059
+ " 4 South Zone (Men, Women) \n",
1060
+ " 5 West Zone (Men, Women) \n",
1061
+ " 6 Others \n",
1062
+ " \n",
1063
+ " 1 \n",
1064
+ " 0 Chhattisgarh (Men, Women) Madhya Pradesh (Men,... \n",
1065
+ " 1 Assam (Men, Women) Bengal (Men, Women) Bihar (... \n",
1066
+ " 2 Chandigarh (Men, Women) Delhi (Men, Women) Har... \n",
1067
+ " 3 Arunachal Pradesh (Men, Women) Manipur (Men, W... \n",
1068
+ " 4 Andhra (Men, Women) Hyderabad (Men, Women) Kar... \n",
1069
+ " 5 Baroda (Men, Women) Goa (Men, Women) Gujarat (... \n",
1070
+ " 6 Association of Indian Universities Cricket Clu... ,\n",
1071
+ " 0 1\n",
1072
+ " 0 Senior First-class Ranji Trophy Duleep Trophy Irani C...\n",
1073
+ " 1 First-class Ranji Trophy Duleep Trophy Irani Cup Senior Wo...\n",
1074
+ " 2 One Day Deodhar Trophy Vijay Hazare Trophy Women's Sen...\n",
1075
+ " 3 Twenty20 State Syed Mushtaq Ali Trophy Women's Senior T...\n",
1076
+ " 4 State Syed Mushtaq Ali Trophy Women's Senior T20 Tro...\n",
1077
+ " 5 Franchise Indian Premier League Women's Premier League I...\n",
1078
+ " 6 Regional Andhra Premier League Bengal Pro T20 League De...\n",
1079
+ " 7 Youth First-class C. K. Nayudu Trophy Cooch Behar Tr...\n",
1080
+ " 8 First-class C. K. Nayudu Trophy Cooch Behar Trophy\n",
1081
+ " 9 List A Vinoo Mankad Trophy Vizzy Trophy Rohinton Bari...\n",
1082
+ " 10 T10 Indian Street Premier League,\n",
1083
+ " 0 1\n",
1084
+ " 0 First-class Ranji Trophy Duleep Trophy Irani Cup Senior Wo...\n",
1085
+ " 1 One Day Deodhar Trophy Vijay Hazare Trophy Women's Sen...\n",
1086
+ " 2 Twenty20 State Syed Mushtaq Ali Trophy Women's Senior T...\n",
1087
+ " 3 State Syed Mushtaq Ali Trophy Women's Senior T20 Tro...\n",
1088
+ " 4 Franchise Indian Premier League Women's Premier League I...\n",
1089
+ " 5 Regional Andhra Premier League Bengal Pro T20 League De...,\n",
1090
+ " 0 1\n",
1091
+ " 0 State Syed Mushtaq Ali Trophy Women's Senior T20 Tro...\n",
1092
+ " 1 Franchise Indian Premier League Women's Premier League I...\n",
1093
+ " 2 Regional Andhra Premier League Bengal Pro T20 League De...,\n",
1094
+ " 0 1\n",
1095
+ " 0 First-class C. K. Nayudu Trophy Cooch Behar Trophy\n",
1096
+ " 1 List A Vinoo Mankad Trophy Vizzy Trophy Rohinton Bari...,\n",
1097
+ " vteTwenty20 cricket leagues \\\n",
1098
+ " 0 Current \n",
1099
+ " 1 Africa \n",
1100
+ " 2 Americas \n",
1101
+ " 3 Asia \n",
1102
+ " 4 Europe \n",
1103
+ " 5 Oceania \n",
1104
+ " 6 Defunct \n",
1105
+ " 7 International \n",
1106
+ " 8 Africa \n",
1107
+ " 9 Americas \n",
1108
+ " 10 Asia \n",
1109
+ " 11 Europe \n",
1110
+ " 12 Oceania \n",
1111
+ " \n",
1112
+ " vteTwenty20 cricket leagues.1 \n",
1113
+ " 0 Africa CSA Provincial Twenty20 (South Africa) ... \n",
1114
+ " 1 CSA Provincial Twenty20 (South Africa) Women's... \n",
1115
+ " 2 Caribbean Premier League (West Indies) Twenty2... \n",
1116
+ " 3 Afghanistan Premier League (Afghanistan) Shpag... \n",
1117
+ " 4 T20 Blast (England and Wales) Women's Twenty20... \n",
1118
+ " 5 Big Bash League (Australia) Women's Big Bash L... \n",
1119
+ " 6 International Champions League Twenty20 (Inter... \n",
1120
+ " 7 Champions League Twenty20 (International) Stan... \n",
1121
+ " 8 Mzansi Super League (South Africa) Africa T20 ... \n",
1122
+ " 9 CIBC National Cricket League (Canada) American... \n",
1123
+ " 10 Etisalat Sixes T20 Tournament (Afghanistan) Na... \n",
1124
+ " 11 Charlotte Edwards Cup (England and Wales) Euro... \n",
1125
+ " 12 Australian Women's Twenty20 Cup (Australia) KF... ,\n",
1126
+ " 0 1\n",
1127
+ " 0 Africa CSA Provincial Twenty20 (South Africa) Women's...\n",
1128
+ " 1 Americas Caribbean Premier League (West Indies) Twenty2...\n",
1129
+ " 2 Asia Afghanistan Premier League (Afghanistan) Shpag...\n",
1130
+ " 3 Europe T20 Blast (England and Wales) Women's Twenty20...\n",
1131
+ " 4 Oceania Big Bash League (Australia) Women's Big Bash L...,\n",
1132
+ " 0 1\n",
1133
+ " 0 International Champions League Twenty20 (International) Stan...\n",
1134
+ " 1 Africa Mzansi Super League (South Africa) Africa T20 ...\n",
1135
+ " 2 Americas CIBC National Cricket League (Canada) American...\n",
1136
+ " 3 Asia Etisalat Sixes T20 Tournament (Afghanistan) Na...\n",
1137
+ " 4 Europe Charlotte Edwards Cup (England and Wales) Euro...\n",
1138
+ " 5 Oceania Australian Women's Twenty20 Cup (Australia) KF...,\n",
1139
+ " vteChampions League Twenty20 \\\n",
1140
+ " 0 Editions \n",
1141
+ " 1 Squads \n",
1142
+ " 2 Lists \n",
1143
+ " 3 Qualifying tournaments \n",
1144
+ " 4 2014 \n",
1145
+ " 5 2009–2013 \n",
1146
+ " \n",
1147
+ " vteChampions League Twenty20.1 \\\n",
1148
+ " 0 2008 2009 2010 2011 2012 2013 2014 \n",
1149
+ " 1 2008 2009 2010 2011 2012 2013 2014 \n",
1150
+ " 2 Records and statistics Captains \n",
1151
+ " 3 2014 Big Bash League Caribbean Premier League ... \n",
1152
+ " 4 Big Bash League Caribbean Premier League Haier... \n",
1153
+ " 5 Sri Lanka Premier League (2012) Friends Life t... \n",
1154
+ " \n",
1155
+ " vteChampions League Twenty20.2 \n",
1156
+ " 0 NaN \n",
1157
+ " 1 NaN \n",
1158
+ " 2 NaN \n",
1159
+ " 3 NaN \n",
1160
+ " 4 NaN \n",
1161
+ " 5 NaN ,\n",
1162
+ " 0 1\n",
1163
+ " 0 2014 Big Bash League Caribbean Premier League Haier...\n",
1164
+ " 1 2009–2013 Sri Lanka Premier League (2012) Friends Life t...,\n",
1165
+ " vteSports leagues of India \\\n",
1166
+ " 0 National \n",
1167
+ " 1 Basketball \n",
1168
+ " 2 Cricket \n",
1169
+ " 3 First class \n",
1170
+ " 4 List A \n",
1171
+ " 5 Twenty20 \n",
1172
+ " 6 T10 \n",
1173
+ " 7 Youth \n",
1174
+ " 8 Field hockey \n",
1175
+ " 9 Football \n",
1176
+ " 10 Kabbadi \n",
1177
+ " 11 Motorsports \n",
1178
+ " 12 Volley Ball \n",
1179
+ " 13 Others \n",
1180
+ " 14 Regional \n",
1181
+ " 15 Cricket \n",
1182
+ " 16 Football \n",
1183
+ " 17 North and Central \n",
1184
+ " 18 East and Northeast \n",
1185
+ " 19 West \n",
1186
+ " 20 South \n",
1187
+ " 21 Others \n",
1188
+ " 22 †Defunct; ^ Proposed \n",
1189
+ " \n",
1190
+ " vteSports leagues of India.1 \n",
1191
+ " 0 Basketball 3x3 Pro Basketball League Elite Pro... \n",
1192
+ " 1 3x3 Pro Basketball League Elite Pro Basketball... \n",
1193
+ " 2 First class Duleep Trophy Irani Trophy Senior ... \n",
1194
+ " 3 Duleep Trophy Irani Trophy Senior Women's Inte... \n",
1195
+ " 4 Deodhar Trophy Senior Women's One Day Challeng... \n",
1196
+ " 5 Indian Cricket League† Indian Premier League S... \n",
1197
+ " 6 Indian Street Premier League \n",
1198
+ " 7 CK Nayudu Trophy Cooch Behar Trophy Rohinton B... \n",
1199
+ " 8 Hockey India League Premier Hockey League† Wor... \n",
1200
+ " 9 Development League† Elite Football League† I-L... \n",
1201
+ " 10 Pro Kabaddi League Real Kabaddi League Women's... \n",
1202
+ " 11 I1 Super Series^ Indian Racing League Indian S... \n",
1203
+ " 12 Indian Volley League† Prime Volleyball League ... \n",
1204
+ " 13 Equestrian Premier League Futsal Club Champion... \n",
1205
+ " 14 Cricket Andhra Premier League Bengal Pro T20 L... \n",
1206
+ " 15 Andhra Premier League Bengal Pro T20 League De... \n",
1207
+ " 16 North and Central Chhattisgarh Football League... \n",
1208
+ " 17 Chhattisgarh Football League Championship FD S... \n",
1209
+ " 18 Indrajit Namchoom Arunachal League Assam State... \n",
1210
+ " 19 Goa Football League Goa Women's League Gujarat... \n",
1211
+ " 20 Bangalore Football League‎ Bangalore Super Div... \n",
1212
+ " 21 Calcutta Hockey League Junior Badminton League... \n",
1213
+ " 22 †Defunct; ^ Proposed ,\n",
1214
+ " 0 1\n",
1215
+ " 0 Basketball 3x3 Pro Basketball League Elite Pro Basketball...\n",
1216
+ " 1 Cricket First class Duleep Trophy Irani Trophy Senior ...\n",
1217
+ " 2 First class Duleep Trophy Irani Trophy Senior Women's Inte...\n",
1218
+ " 3 List A Deodhar Trophy Senior Women's One Day Challeng...\n",
1219
+ " 4 Twenty20 Indian Cricket League† Indian Premier League S...\n",
1220
+ " 5 T10 Indian Street Premier League\n",
1221
+ " 6 Youth CK Nayudu Trophy Cooch Behar Trophy Rohinton B...\n",
1222
+ " 7 Field hockey Hockey India League Premier Hockey League† Wor...\n",
1223
+ " 8 Football Development League† Elite Football League† I-L...\n",
1224
+ " 9 Kabbadi Pro Kabaddi League Real Kabaddi League Women's...\n",
1225
+ " 10 Motorsports I1 Super Series^ Indian Racing League Indian S...\n",
1226
+ " 11 Volley Ball Indian Volley League† Prime Volleyball League ...\n",
1227
+ " 12 Others Equestrian Premier League Futsal Club Champion...,\n",
1228
+ " 0 1\n",
1229
+ " 0 First class Duleep Trophy Irani Trophy Senior Women's Inte...\n",
1230
+ " 1 List A Deodhar Trophy Senior Women's One Day Challeng...\n",
1231
+ " 2 Twenty20 Indian Cricket League† Indian Premier League S...\n",
1232
+ " 3 T10 Indian Street Premier League\n",
1233
+ " 4 Youth CK Nayudu Trophy Cooch Behar Trophy Rohinton B...,\n",
1234
+ " 0 1\n",
1235
+ " 0 Cricket Andhra Premier League Bengal Pro T20 League De...\n",
1236
+ " 1 Football North and Central Chhattisgarh Football League...\n",
1237
+ " 2 North and Central Chhattisgarh Football League Championship FD S...\n",
1238
+ " 3 East and Northeast Indrajit Namchoom Arunachal League Assam State...\n",
1239
+ " 4 West Goa Football League Goa Women's League Gujarat...\n",
1240
+ " 5 South Bangalore Football League‎ Bangalore Super Div...\n",
1241
+ " 6 Others Calcutta Hockey League Junior Badminton League...,\n",
1242
+ " 0 1\n",
1243
+ " 0 North and Central Chhattisgarh Football League Championship FD S...\n",
1244
+ " 1 East and Northeast Indrajit Namchoom Arunachal League Assam State...\n",
1245
+ " 2 West Goa Football League Goa Women's League Gujarat...\n",
1246
+ " 3 South Bangalore Football League‎ Bangalore Super Div...,\n",
1247
+ " 0 1\n",
1248
+ " 0 Authority control databases: National Germany]"
1249
+ ]
1250
+ },
1251
+ "execution_count": 47,
1252
+ "metadata": {},
1253
+ "output_type": "execute_result"
1254
+ }
1255
+ ],
1256
+ "source": [
1257
+ "d"
1258
+ ]
1259
+ },
1260
+ {
1261
+ "cell_type": "code",
1262
+ "execution_count": 50,
1263
+ "id": "22aa0288-2b44-446b-95b7-ab3dd115fb6b",
1264
+ "metadata": {},
1265
+ "outputs": [
1266
+ {
1267
+ "data": {
1268
+ "text/plain": [
1269
+ "40"
1270
+ ]
1271
+ },
1272
+ "execution_count": 50,
1273
+ "metadata": {},
1274
+ "output_type": "execute_result"
1275
+ }
1276
+ ],
1277
+ "source": [
1278
+ "len(d)"
1279
+ ]
1280
+ },
1281
+ {
1282
+ "cell_type": "code",
1283
+ "execution_count": 52,
1284
+ "id": "f3184cf9-90b6-4d6e-8c4f-952a99feeab2",
1285
+ "metadata": {},
1286
+ "outputs": [
1287
+ {
1288
+ "data": {
1289
+ "text/plain": [
1290
+ "list"
1291
+ ]
1292
+ },
1293
+ "execution_count": 52,
1294
+ "metadata": {},
1295
+ "output_type": "execute_result"
1296
+ }
1297
+ ],
1298
+ "source": [
1299
+ "type(d)"
1300
+ ]
1301
+ },
1302
+ {
1303
+ "cell_type": "code",
1304
+ "execution_count": 54,
1305
+ "id": "868d4f72-05e0-4c22-91a0-f7cfc5c3d9e3",
1306
+ "metadata": {},
1307
+ "outputs": [
1308
+ {
1309
+ "data": {
1310
+ "text/html": [
1311
+ "<div>\n",
1312
+ "<style scoped>\n",
1313
+ " .dataframe tbody tr th:only-of-type {\n",
1314
+ " vertical-align: middle;\n",
1315
+ " }\n",
1316
+ "\n",
1317
+ " .dataframe tbody tr th {\n",
1318
+ " vertical-align: top;\n",
1319
+ " }\n",
1320
+ "\n",
1321
+ " .dataframe thead th {\n",
1322
+ " text-align: right;\n",
1323
+ " }\n",
1324
+ "</style>\n",
1325
+ "<table border=\"1\" class=\"dataframe\">\n",
1326
+ " <thead>\n",
1327
+ " <tr style=\"text-align: right;\">\n",
1328
+ " <th></th>\n",
1329
+ " <th>0</th>\n",
1330
+ " <th>1</th>\n",
1331
+ " </tr>\n",
1332
+ " </thead>\n",
1333
+ " <tbody>\n",
1334
+ " <tr>\n",
1335
+ " <th>0</th>\n",
1336
+ " <td>NaN</td>\n",
1337
+ " <td>NaN</td>\n",
1338
+ " </tr>\n",
1339
+ " <tr>\n",
1340
+ " <th>1</th>\n",
1341
+ " <td>Countries</td>\n",
1342
+ " <td>India</td>\n",
1343
+ " </tr>\n",
1344
+ " <tr>\n",
1345
+ " <th>2</th>\n",
1346
+ " <td>Administrator</td>\n",
1347
+ " <td>Board of Control for Cricket in India (BCCI)</td>\n",
1348
+ " </tr>\n",
1349
+ " <tr>\n",
1350
+ " <th>3</th>\n",
1351
+ " <td>Headquarters</td>\n",
1352
+ " <td>Cricket Centre, Churchgate, Mumbai, Maharashtra</td>\n",
1353
+ " </tr>\n",
1354
+ " <tr>\n",
1355
+ " <th>4</th>\n",
1356
+ " <td>Format</td>\n",
1357
+ " <td>Twenty20</td>\n",
1358
+ " </tr>\n",
1359
+ " <tr>\n",
1360
+ " <th>5</th>\n",
1361
+ " <td>First edition</td>\n",
1362
+ " <td>2008</td>\n",
1363
+ " </tr>\n",
1364
+ " <tr>\n",
1365
+ " <th>6</th>\n",
1366
+ " <td>Latest edition</td>\n",
1367
+ " <td>2024</td>\n",
1368
+ " </tr>\n",
1369
+ " <tr>\n",
1370
+ " <th>7</th>\n",
1371
+ " <td>Next edition</td>\n",
1372
+ " <td>2025</td>\n",
1373
+ " </tr>\n",
1374
+ " <tr>\n",
1375
+ " <th>8</th>\n",
1376
+ " <td>Tournament format</td>\n",
1377
+ " <td>Round-robin format with group system and playoffs</td>\n",
1378
+ " </tr>\n",
1379
+ " <tr>\n",
1380
+ " <th>9</th>\n",
1381
+ " <td>Number of teams</td>\n",
1382
+ " <td>10</td>\n",
1383
+ " </tr>\n",
1384
+ " <tr>\n",
1385
+ " <th>10</th>\n",
1386
+ " <td>Current champion</td>\n",
1387
+ " <td>Kolkata Knight Riders (3rd title)</td>\n",
1388
+ " </tr>\n",
1389
+ " <tr>\n",
1390
+ " <th>11</th>\n",
1391
+ " <td>Most successful</td>\n",
1392
+ " <td>Chennai Super Kings Mumbai Indians (5 titles e...</td>\n",
1393
+ " </tr>\n",
1394
+ " <tr>\n",
1395
+ " <th>12</th>\n",
1396
+ " <td>Most runs</td>\n",
1397
+ " <td>Virat Kohli (8,004)</td>\n",
1398
+ " </tr>\n",
1399
+ " <tr>\n",
1400
+ " <th>13</th>\n",
1401
+ " <td>Most wickets</td>\n",
1402
+ " <td>Yuzvendra Chahal (205)</td>\n",
1403
+ " </tr>\n",
1404
+ " <tr>\n",
1405
+ " <th>14</th>\n",
1406
+ " <td>TV</td>\n",
1407
+ " <td>India Star Sports (TV)[1] JioCinema (Internet)...</td>\n",
1408
+ " </tr>\n",
1409
+ " <tr>\n",
1410
+ " <th>15</th>\n",
1411
+ " <td>Website</td>\n",
1412
+ " <td>iplt20.com</td>\n",
1413
+ " </tr>\n",
1414
+ " </tbody>\n",
1415
+ "</table>\n",
1416
+ "</div>"
1417
+ ],
1418
+ "text/plain": [
1419
+ " 0 1\n",
1420
+ "0 NaN NaN\n",
1421
+ "1 Countries India\n",
1422
+ "2 Administrator Board of Control for Cricket in India (BCCI)\n",
1423
+ "3 Headquarters Cricket Centre, Churchgate, Mumbai, Maharashtra\n",
1424
+ "4 Format Twenty20\n",
1425
+ "5 First edition 2008\n",
1426
+ "6 Latest edition 2024\n",
1427
+ "7 Next edition 2025\n",
1428
+ "8 Tournament format Round-robin format with group system and playoffs\n",
1429
+ "9 Number of teams 10\n",
1430
+ "10 Current champion Kolkata Knight Riders (3rd title)\n",
1431
+ "11 Most successful Chennai Super Kings Mumbai Indians (5 titles e...\n",
1432
+ "12 Most runs Virat Kohli (8,004)\n",
1433
+ "13 Most wickets Yuzvendra Chahal (205)\n",
1434
+ "14 TV India Star Sports (TV)[1] JioCinema (Internet)...\n",
1435
+ "15 Website iplt20.com"
1436
+ ]
1437
+ },
1438
+ "execution_count": 54,
1439
+ "metadata": {},
1440
+ "output_type": "execute_result"
1441
+ }
1442
+ ],
1443
+ "source": [
1444
+ "d[0] # ---- first data table will be scrapped"
1445
+ ]
1446
+ },
1447
+ {
1448
+ "cell_type": "code",
1449
+ "execution_count": 58,
1450
+ "id": "cae3a0c9-c696-4843-a9af-c20bba0e1315",
1451
+ "metadata": {},
1452
+ "outputs": [
1453
+ {
1454
+ "data": {
1455
+ "text/html": [
1456
+ "<div>\n",
1457
+ "<style scoped>\n",
1458
+ " .dataframe tbody tr th:only-of-type {\n",
1459
+ " vertical-align: middle;\n",
1460
+ " }\n",
1461
+ "\n",
1462
+ " .dataframe tbody tr th {\n",
1463
+ " vertical-align: top;\n",
1464
+ " }\n",
1465
+ "\n",
1466
+ " .dataframe thead th {\n",
1467
+ " text-align: right;\n",
1468
+ " }\n",
1469
+ "</style>\n",
1470
+ "<table border=\"1\" class=\"dataframe\">\n",
1471
+ " <thead>\n",
1472
+ " <tr style=\"text-align: right;\">\n",
1473
+ " <th></th>\n",
1474
+ " <th>Season</th>\n",
1475
+ " <th>Winners</th>\n",
1476
+ " </tr>\n",
1477
+ " </thead>\n",
1478
+ " <tbody>\n",
1479
+ " <tr>\n",
1480
+ " <th>0</th>\n",
1481
+ " <td>2008</td>\n",
1482
+ " <td>Rajasthan Royals</td>\n",
1483
+ " </tr>\n",
1484
+ " <tr>\n",
1485
+ " <th>1</th>\n",
1486
+ " <td>2009</td>\n",
1487
+ " <td>Deccan Chargers</td>\n",
1488
+ " </tr>\n",
1489
+ " <tr>\n",
1490
+ " <th>2</th>\n",
1491
+ " <td>2010</td>\n",
1492
+ " <td>Chennai Super Kings</td>\n",
1493
+ " </tr>\n",
1494
+ " <tr>\n",
1495
+ " <th>3</th>\n",
1496
+ " <td>2011</td>\n",
1497
+ " <td>Chennai Super Kings (2)</td>\n",
1498
+ " </tr>\n",
1499
+ " <tr>\n",
1500
+ " <th>4</th>\n",
1501
+ " <td>2012</td>\n",
1502
+ " <td>Kolkata Knight Riders</td>\n",
1503
+ " </tr>\n",
1504
+ " <tr>\n",
1505
+ " <th>5</th>\n",
1506
+ " <td>2013</td>\n",
1507
+ " <td>Mumbai Indians</td>\n",
1508
+ " </tr>\n",
1509
+ " <tr>\n",
1510
+ " <th>6</th>\n",
1511
+ " <td>2014</td>\n",
1512
+ " <td>Kolkata Knight Riders (2)</td>\n",
1513
+ " </tr>\n",
1514
+ " <tr>\n",
1515
+ " <th>7</th>\n",
1516
+ " <td>2015</td>\n",
1517
+ " <td>Mumbai Indians (2)</td>\n",
1518
+ " </tr>\n",
1519
+ " <tr>\n",
1520
+ " <th>8</th>\n",
1521
+ " <td>2016</td>\n",
1522
+ " <td>Sunrisers Hyderabad</td>\n",
1523
+ " </tr>\n",
1524
+ " <tr>\n",
1525
+ " <th>9</th>\n",
1526
+ " <td>2017</td>\n",
1527
+ " <td>Mumbai Indians (3)</td>\n",
1528
+ " </tr>\n",
1529
+ " <tr>\n",
1530
+ " <th>10</th>\n",
1531
+ " <td>2018</td>\n",
1532
+ " <td>Chennai Super Kings (3)</td>\n",
1533
+ " </tr>\n",
1534
+ " <tr>\n",
1535
+ " <th>11</th>\n",
1536
+ " <td>2019</td>\n",
1537
+ " <td>Mumbai Indians (4)</td>\n",
1538
+ " </tr>\n",
1539
+ " <tr>\n",
1540
+ " <th>12</th>\n",
1541
+ " <td>2020</td>\n",
1542
+ " <td>Mumbai Indians (5)</td>\n",
1543
+ " </tr>\n",
1544
+ " <tr>\n",
1545
+ " <th>13</th>\n",
1546
+ " <td>2021</td>\n",
1547
+ " <td>Chennai Super Kings (4)</td>\n",
1548
+ " </tr>\n",
1549
+ " <tr>\n",
1550
+ " <th>14</th>\n",
1551
+ " <td>2022</td>\n",
1552
+ " <td>Gujarat Titans</td>\n",
1553
+ " </tr>\n",
1554
+ " <tr>\n",
1555
+ " <th>15</th>\n",
1556
+ " <td>2023</td>\n",
1557
+ " <td>Chennai Super Kings (5)</td>\n",
1558
+ " </tr>\n",
1559
+ " <tr>\n",
1560
+ " <th>16</th>\n",
1561
+ " <td>2024</td>\n",
1562
+ " <td>Kolkata Knight Riders (3)</td>\n",
1563
+ " </tr>\n",
1564
+ " </tbody>\n",
1565
+ "</table>\n",
1566
+ "</div>"
1567
+ ],
1568
+ "text/plain": [
1569
+ " Season Winners\n",
1570
+ "0 2008 Rajasthan Royals\n",
1571
+ "1 2009 Deccan Chargers\n",
1572
+ "2 2010 Chennai Super Kings\n",
1573
+ "3 2011 Chennai Super Kings (2)\n",
1574
+ "4 2012 Kolkata Knight Riders\n",
1575
+ "5 2013 Mumbai Indians\n",
1576
+ "6 2014 Kolkata Knight Riders (2)\n",
1577
+ "7 2015 Mumbai Indians (2)\n",
1578
+ "8 2016 Sunrisers Hyderabad\n",
1579
+ "9 2017 Mumbai Indians (3)\n",
1580
+ "10 2018 Chennai Super Kings (3)\n",
1581
+ "11 2019 Mumbai Indians (4)\n",
1582
+ "12 2020 Mumbai Indians (5)\n",
1583
+ "13 2021 Chennai Super Kings (4)\n",
1584
+ "14 2022 Gujarat Titans\n",
1585
+ "15 2023 Chennai Super Kings (5)\n",
1586
+ "16 2024 Kolkata Knight Riders (3)"
1587
+ ]
1588
+ },
1589
+ "execution_count": 58,
1590
+ "metadata": {},
1591
+ "output_type": "execute_result"
1592
+ }
1593
+ ],
1594
+ "source": [
1595
+ "d[2] ## --- third data table will be scrapped"
1596
+ ]
1597
+ },
1598
+ {
1599
+ "cell_type": "code",
1600
+ "execution_count": 60,
1601
+ "id": "fe0ccf50-056e-457d-8693-1406134c7fa9",
1602
+ "metadata": {},
1603
+ "outputs": [],
1604
+ "source": [
1605
+ "## If i Want to scrapped a particular table from those 40 table i need to select a unique value from the table which i want\n",
1606
+ "## for ex\n",
1607
+ "d =pd.read_html(\"https://en.wikipedia.org/wiki/Indian_Premier_League\",match=\"Sahara India Pariwar\")"
1608
+ ]
1609
+ },
1610
+ {
1611
+ "cell_type": "code",
1612
+ "execution_count": 64,
1613
+ "id": "c2ac23e5-951a-42b6-89cf-e146a7838fad",
1614
+ "metadata": {},
1615
+ "outputs": [
1616
+ {
1617
+ "data": {
1618
+ "text/plain": [
1619
+ "1"
1620
+ ]
1621
+ },
1622
+ "execution_count": 64,
1623
+ "metadata": {},
1624
+ "output_type": "execute_result"
1625
+ }
1626
+ ],
1627
+ "source": [
1628
+ "len(d)"
1629
+ ]
1630
+ },
1631
+ {
1632
+ "cell_type": "code",
1633
+ "execution_count": 66,
1634
+ "id": "573799de-7e8c-4023-b6f5-b799d42a01a0",
1635
+ "metadata": {},
1636
+ "outputs": [
1637
+ {
1638
+ "data": {
1639
+ "text/html": [
1640
+ "<div>\n",
1641
+ "<style scoped>\n",
1642
+ " .dataframe tbody tr th:only-of-type {\n",
1643
+ " vertical-align: middle;\n",
1644
+ " }\n",
1645
+ "\n",
1646
+ " .dataframe tbody tr th {\n",
1647
+ " vertical-align: top;\n",
1648
+ " }\n",
1649
+ "\n",
1650
+ " .dataframe thead th {\n",
1651
+ " text-align: right;\n",
1652
+ " }\n",
1653
+ "</style>\n",
1654
+ "<table border=\"1\" class=\"dataframe\">\n",
1655
+ " <thead>\n",
1656
+ " <tr style=\"text-align: right;\">\n",
1657
+ " <th></th>\n",
1658
+ " <th>Team</th>\n",
1659
+ " <th>City</th>\n",
1660
+ " <th>State</th>\n",
1661
+ " <th>Home ground</th>\n",
1662
+ " <th>Debut</th>\n",
1663
+ " <th>Dissolved</th>\n",
1664
+ " <th>Owner(s)</th>\n",
1665
+ " </tr>\n",
1666
+ " </thead>\n",
1667
+ " <tbody>\n",
1668
+ " <tr>\n",
1669
+ " <th>0</th>\n",
1670
+ " <td>Deccan Chargers</td>\n",
1671
+ " <td>Hyderabad</td>\n",
1672
+ " <td>Andhra Pradesh[75]</td>\n",
1673
+ " <td>Rajiv Gandhi Stadium</td>\n",
1674
+ " <td>2008</td>\n",
1675
+ " <td>2012</td>\n",
1676
+ " <td>Deccan Chronicle</td>\n",
1677
+ " </tr>\n",
1678
+ " <tr>\n",
1679
+ " <th>1</th>\n",
1680
+ " <td>Kochi Tuskers Kerala</td>\n",
1681
+ " <td>Kochi</td>\n",
1682
+ " <td>Kerala</td>\n",
1683
+ " <td>Jawaharlal Nehru Stadium</td>\n",
1684
+ " <td>2011</td>\n",
1685
+ " <td>2011</td>\n",
1686
+ " <td>Kochi Cricket Pvt Ltd</td>\n",
1687
+ " </tr>\n",
1688
+ " <tr>\n",
1689
+ " <th>2</th>\n",
1690
+ " <td>Pune Warriors India</td>\n",
1691
+ " <td>Pune</td>\n",
1692
+ " <td>Maharashtra</td>\n",
1693
+ " <td>Maharashtra Cricket Association Stadium</td>\n",
1694
+ " <td>2011</td>\n",
1695
+ " <td>2013</td>\n",
1696
+ " <td>Sahara India Pariwar</td>\n",
1697
+ " </tr>\n",
1698
+ " <tr>\n",
1699
+ " <th>3</th>\n",
1700
+ " <td>Rising Pune Supergiant</td>\n",
1701
+ " <td>Pune</td>\n",
1702
+ " <td>Maharashtra</td>\n",
1703
+ " <td>Maharashtra Cricket Association Stadium</td>\n",
1704
+ " <td>2016</td>\n",
1705
+ " <td>2018</td>\n",
1706
+ " <td>RP-Sanjiv Goenka Group</td>\n",
1707
+ " </tr>\n",
1708
+ " <tr>\n",
1709
+ " <th>4</th>\n",
1710
+ " <td>Gujarat Lions</td>\n",
1711
+ " <td>Rajkot</td>\n",
1712
+ " <td>Gujarat</td>\n",
1713
+ " <td>Saurashtra Cricket Association Stadium</td>\n",
1714
+ " <td>2016</td>\n",
1715
+ " <td>2018</td>\n",
1716
+ " <td>Intex Technologies</td>\n",
1717
+ " </tr>\n",
1718
+ " </tbody>\n",
1719
+ "</table>\n",
1720
+ "</div>"
1721
+ ],
1722
+ "text/plain": [
1723
+ " Team City State \\\n",
1724
+ "0 Deccan Chargers Hyderabad Andhra Pradesh[75] \n",
1725
+ "1 Kochi Tuskers Kerala Kochi Kerala \n",
1726
+ "2 Pune Warriors India Pune Maharashtra \n",
1727
+ "3 Rising Pune Supergiant Pune Maharashtra \n",
1728
+ "4 Gujarat Lions Rajkot Gujarat \n",
1729
+ "\n",
1730
+ " Home ground Debut Dissolved \\\n",
1731
+ "0 Rajiv Gandhi Stadium 2008 2012 \n",
1732
+ "1 Jawaharlal Nehru Stadium 2011 2011 \n",
1733
+ "2 Maharashtra Cricket Association Stadium 2011 2013 \n",
1734
+ "3 Maharashtra Cricket Association Stadium 2016 2018 \n",
1735
+ "4 Saurashtra Cricket Association Stadium 2016 2018 \n",
1736
+ "\n",
1737
+ " Owner(s) \n",
1738
+ "0 Deccan Chronicle \n",
1739
+ "1 Kochi Cricket Pvt Ltd \n",
1740
+ "2 Sahara India Pariwar \n",
1741
+ "3 RP-Sanjiv Goenka Group \n",
1742
+ "4 Intex Technologies "
1743
+ ]
1744
+ },
1745
+ "execution_count": 66,
1746
+ "metadata": {},
1747
+ "output_type": "execute_result"
1748
+ }
1749
+ ],
1750
+ "source": [
1751
+ "d[0]"
1752
+ ]
1753
+ },
1754
+ {
1755
+ "cell_type": "code",
1756
+ "execution_count": 68,
1757
+ "id": "8b87a88c-c2c1-4409-bc85-d8dd88ee2b55",
1758
+ "metadata": {},
1759
+ "outputs": [],
1760
+ "source": [
1761
+ "d[0].to_html(\"iplwikipedia.html\")"
1762
+ ]
1763
+ },
1764
+ {
1765
+ "cell_type": "code",
1766
+ "execution_count": null,
1767
+ "id": "aa0f985f-306c-40f4-9ae3-99a0993b32cc",
1768
+ "metadata": {},
1769
+ "outputs": [],
1770
+ "source": []
1771
+ }
1772
+ ],
1773
+ "metadata": {
1774
+ "kernelspec": {
1775
+ "display_name": "Python 3 (ipykernel)",
1776
+ "language": "python",
1777
+ "name": "python3"
1778
+ },
1779
+ "language_info": {
1780
+ "codemirror_mode": {
1781
+ "name": "ipython",
1782
+ "version": 3
1783
+ },
1784
+ "file_extension": ".py",
1785
+ "mimetype": "text/x-python",
1786
+ "name": "python",
1787
+ "nbconvert_exporter": "python",
1788
+ "pygments_lexer": "ipython3",
1789
+ "version": "3.11.7"
1790
+ }
1791
+ },
1792
+ "nbformat": 4,
1793
+ "nbformat_minor": 5
1794
+ }
Handling csv.ipynb ADDED
@@ -0,0 +1,1929 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "id": "ae5ed4cb-4d77-46bc-9628-e21f62dd17cb",
6
+ "metadata": {},
7
+ "source": [
8
+ "# Handling Csv Files"
9
+ ]
10
+ },
11
+ {
12
+ "cell_type": "code",
13
+ "execution_count": 2,
14
+ "id": "a82162bc",
15
+ "metadata": {},
16
+ "outputs": [],
17
+ "source": [
18
+ "import pandas as pd"
19
+ ]
20
+ },
21
+ {
22
+ "cell_type": "code",
23
+ "execution_count": 2,
24
+ "id": "4d27ce42",
25
+ "metadata": {},
26
+ "outputs": [
27
+ {
28
+ "data": {
29
+ "text/html": [
30
+ "<div>\n",
31
+ "<style scoped>\n",
32
+ " .dataframe tbody tr th:only-of-type {\n",
33
+ " vertical-align: middle;\n",
34
+ " }\n",
35
+ "\n",
36
+ " .dataframe tbody tr th {\n",
37
+ " vertical-align: top;\n",
38
+ " }\n",
39
+ "\n",
40
+ " .dataframe thead th {\n",
41
+ " text-align: right;\n",
42
+ " }\n",
43
+ "</style>\n",
44
+ "<table border=\"1\" class=\"dataframe\">\n",
45
+ " <thead>\n",
46
+ " <tr style=\"text-align: right;\">\n",
47
+ " <th></th>\n",
48
+ " <th>name</th>\n",
49
+ " <th>age</th>\n",
50
+ " </tr>\n",
51
+ " </thead>\n",
52
+ " <tbody>\n",
53
+ " <tr>\n",
54
+ " <th>0</th>\n",
55
+ " <td>p1</td>\n",
56
+ " <td>25</td>\n",
57
+ " </tr>\n",
58
+ " <tr>\n",
59
+ " <th>1</th>\n",
60
+ " <td>p2</td>\n",
61
+ " <td>23</td>\n",
62
+ " </tr>\n",
63
+ " </tbody>\n",
64
+ "</table>\n",
65
+ "</div>"
66
+ ],
67
+ "text/plain": [
68
+ " name age\n",
69
+ "0 p1 25\n",
70
+ "1 p2 23"
71
+ ]
72
+ },
73
+ "execution_count": 2,
74
+ "metadata": {},
75
+ "output_type": "execute_result"
76
+ }
77
+ ],
78
+ "source": [
79
+ "pd.read_csv(r\"E:\\assigiments in innomatric\\parse error ml.txt\",on_bad_lines = \"skip\")"
80
+ ]
81
+ },
82
+ {
83
+ "cell_type": "code",
84
+ "execution_count": 3,
85
+ "id": "079e1943",
86
+ "metadata": {},
87
+ "outputs": [
88
+ {
89
+ "name": "stderr",
90
+ "output_type": "stream",
91
+ "text": [
92
+ "C:\\Users\\Hp\\AppData\\Local\\Temp\\ipykernel_16540\\608975540.py:1: ParserWarning: Skipping line 4: expected 2 fields, saw 3\n",
93
+ "\n",
94
+ " pd.read_csv(r\"E:\\assigiments in innomatric\\parse error ml.txt\",on_bad_lines = \"warn\")\n"
95
+ ]
96
+ },
97
+ {
98
+ "data": {
99
+ "text/html": [
100
+ "<div>\n",
101
+ "<style scoped>\n",
102
+ " .dataframe tbody tr th:only-of-type {\n",
103
+ " vertical-align: middle;\n",
104
+ " }\n",
105
+ "\n",
106
+ " .dataframe tbody tr th {\n",
107
+ " vertical-align: top;\n",
108
+ " }\n",
109
+ "\n",
110
+ " .dataframe thead th {\n",
111
+ " text-align: right;\n",
112
+ " }\n",
113
+ "</style>\n",
114
+ "<table border=\"1\" class=\"dataframe\">\n",
115
+ " <thead>\n",
116
+ " <tr style=\"text-align: right;\">\n",
117
+ " <th></th>\n",
118
+ " <th>name</th>\n",
119
+ " <th>age</th>\n",
120
+ " </tr>\n",
121
+ " </thead>\n",
122
+ " <tbody>\n",
123
+ " <tr>\n",
124
+ " <th>0</th>\n",
125
+ " <td>p1</td>\n",
126
+ " <td>25</td>\n",
127
+ " </tr>\n",
128
+ " <tr>\n",
129
+ " <th>1</th>\n",
130
+ " <td>p2</td>\n",
131
+ " <td>23</td>\n",
132
+ " </tr>\n",
133
+ " </tbody>\n",
134
+ "</table>\n",
135
+ "</div>"
136
+ ],
137
+ "text/plain": [
138
+ " name age\n",
139
+ "0 p1 25\n",
140
+ "1 p2 23"
141
+ ]
142
+ },
143
+ "execution_count": 3,
144
+ "metadata": {},
145
+ "output_type": "execute_result"
146
+ }
147
+ ],
148
+ "source": [
149
+ "pd.read_csv(r\"E:\\assigiments in innomatric\\parse error ml.txt\",on_bad_lines = \"warn\")"
150
+ ]
151
+ },
152
+ {
153
+ "cell_type": "code",
154
+ "execution_count": 4,
155
+ "id": "93bf060e",
156
+ "metadata": {},
157
+ "outputs": [],
158
+ "source": [
159
+ "l = [\"utf-8\",\"latin\",\"utf16\"]"
160
+ ]
161
+ },
162
+ {
163
+ "cell_type": "code",
164
+ "execution_count": 6,
165
+ "id": "f1dcf74c",
166
+ "metadata": {},
167
+ "outputs": [
168
+ {
169
+ "name": "stdout",
170
+ "output_type": "stream",
171
+ "text": [
172
+ "utf-8 is not encoding\n",
173
+ "latin is correctn encoding\n",
174
+ "utf16 is not encoding\n"
175
+ ]
176
+ }
177
+ ],
178
+ "source": [
179
+ "for y in l:\n",
180
+ " try:\n",
181
+ " pd.read_csv(\"spam.csv\",encoding = y)\n",
182
+ " print(\"{} is correctn encoding\".format(y))\n",
183
+ " except UnicodeDecodeError:\n",
184
+ " print(\"{} is not encoding\".format(y))"
185
+ ]
186
+ },
187
+ {
188
+ "cell_type": "code",
189
+ "execution_count": 8,
190
+ "id": "37c8e98f",
191
+ "metadata": {},
192
+ "outputs": [],
193
+ "source": [
194
+ "import encodings"
195
+ ]
196
+ },
197
+ {
198
+ "cell_type": "code",
199
+ "execution_count": 10,
200
+ "id": "11dd0a5d",
201
+ "metadata": {},
202
+ "outputs": [],
203
+ "source": [
204
+ "l =encodings.aliases.aliases.keys()"
205
+ ]
206
+ },
207
+ {
208
+ "cell_type": "code",
209
+ "execution_count": 12,
210
+ "id": "51839ac3",
211
+ "metadata": {},
212
+ "outputs": [
213
+ {
214
+ "data": {
215
+ "text/plain": [
216
+ "dict_keys(['646', 'ansi_x3.4_1968', 'ansi_x3_4_1968', 'ansi_x3.4_1986', 'cp367', 'csascii', 'ibm367', 'iso646_us', 'iso_646.irv_1991', 'iso_ir_6', 'us', 'us_ascii', 'base64', 'base_64', 'big5_tw', 'csbig5', 'big5_hkscs', 'hkscs', 'bz2', '037', 'csibm037', 'ebcdic_cp_ca', 'ebcdic_cp_nl', 'ebcdic_cp_us', 'ebcdic_cp_wt', 'ibm037', 'ibm039', '1026', 'csibm1026', 'ibm1026', '1125', 'ibm1125', 'cp866u', 'ruscii', '1140', 'ibm1140', '1250', 'windows_1250', '1251', 'windows_1251', '1252', 'windows_1252', '1253', 'windows_1253', '1254', 'windows_1254', '1255', 'windows_1255', '1256', 'windows_1256', '1257', 'windows_1257', '1258', 'windows_1258', '273', 'ibm273', 'csibm273', '424', 'csibm424', 'ebcdic_cp_he', 'ibm424', '437', 'cspc8codepage437', 'ibm437', '500', 'csibm500', 'ebcdic_cp_be', 'ebcdic_cp_ch', 'ibm500', '775', 'cspc775baltic', 'ibm775', '850', 'cspc850multilingual', 'ibm850', '852', 'cspcp852', 'ibm852', '855', 'csibm855', 'ibm855', '857', 'csibm857', 'ibm857', '858', 'csibm858', 'ibm858', '860', 'csibm860', 'ibm860', '861', 'cp_is', 'csibm861', 'ibm861', '862', 'cspc862latinhebrew', 'ibm862', '863', 'csibm863', 'ibm863', '864', 'csibm864', 'ibm864', '865', 'csibm865', 'ibm865', '866', 'csibm866', 'ibm866', '869', 'cp_gr', 'csibm869', 'ibm869', '932', 'ms932', 'mskanji', 'ms_kanji', '949', 'ms949', 'uhc', '950', 'ms950', 'jisx0213', 'eucjis2004', 'euc_jis2004', 'eucjisx0213', 'eucjp', 'ujis', 'u_jis', 'euckr', 'korean', 'ksc5601', 'ks_c_5601', 'ks_c_5601_1987', 'ksx1001', 'ks_x_1001', 'gb18030_2000', 'chinese', 'csiso58gb231280', 'euc_cn', 'euccn', 'eucgb2312_cn', 'gb2312_1980', 'gb2312_80', 'iso_ir_58', '936', 'cp936', 'ms936', 'hex', 'roman8', 'r8', 'csHPRoman8', 'cp1051', 'ibm1051', 'hzgb', 'hz_gb', 'hz_gb_2312', 'csiso2022jp', 'iso2022jp', 'iso_2022_jp', 'iso2022jp_1', 'iso_2022_jp_1', 'iso2022jp_2', 'iso_2022_jp_2', 'iso_2022_jp_2004', 'iso2022jp_2004', 'iso2022jp_3', 'iso_2022_jp_3', 'iso2022jp_ext', 'iso_2022_jp_ext', 'csiso2022kr', 'iso2022kr', 'iso_2022_kr', 'csisolatin6', 'iso_8859_10', 'iso_8859_10_1992', 'iso_ir_157', 'l6', 'latin6', 'thai', 'iso_8859_11', 'iso_8859_11_2001', 'iso_8859_13', 'l7', 'latin7', 'iso_8859_14', 'iso_8859_14_1998', 'iso_celtic', 'iso_ir_199', 'l8', 'latin8', 'iso_8859_15', 'l9', 'latin9', 'iso_8859_16', 'iso_8859_16_2001', 'iso_ir_226', 'l10', 'latin10', 'csisolatin2', 'iso_8859_2', 'iso_8859_2_1987', 'iso_ir_101', 'l2', 'latin2', 'csisolatin3', 'iso_8859_3', 'iso_8859_3_1988', 'iso_ir_109', 'l3', 'latin3', 'csisolatin4', 'iso_8859_4', 'iso_8859_4_1988', 'iso_ir_110', 'l4', 'latin4', 'csisolatincyrillic', 'cyrillic', 'iso_8859_5', 'iso_8859_5_1988', 'iso_ir_144', 'arabic', 'asmo_708', 'csisolatinarabic', 'ecma_114', 'iso_8859_6', 'iso_8859_6_1987', 'iso_ir_127', 'csisolatingreek', 'ecma_118', 'elot_928', 'greek', 'greek8', 'iso_8859_7', 'iso_8859_7_1987', 'iso_ir_126', 'csisolatinhebrew', 'hebrew', 'iso_8859_8', 'iso_8859_8_1988', 'iso_ir_138', 'csisolatin5', 'iso_8859_9', 'iso_8859_9_1989', 'iso_ir_148', 'l5', 'latin5', 'cp1361', 'ms1361', 'cskoi8r', 'kz_1048', 'rk1048', 'strk1048_2002', '8859', 'cp819', 'csisolatin1', 'ibm819', 'iso8859', 'iso8859_1', 'iso_8859_1', 'iso_8859_1_1987', 'iso_ir_100', 'l1', 'latin', 'latin1', 'maccyrillic', 'macgreek', 'maciceland', 'maccentraleurope', 'mac_centeuro', 'maclatin2', 'macintosh', 'macroman', 'macturkish', 'ansi', 'dbcs', 'csptcp154', 'pt154', 'cp154', 'cyrillic_asian', 'quopri', 'quoted_printable', 'quotedprintable', 'rot13', 'csshiftjis', 'shiftjis', 'sjis', 's_jis', 'shiftjis2004', 'sjis_2004', 's_jis_2004', 'shiftjisx0213', 'sjisx0213', 's_jisx0213', 'tis620', 'tis_620_0', 'tis_620_2529_0', 'tis_620_2529_1', 'iso_ir_166', 'u16', 'utf16', 'unicodebigunmarked', 'utf_16be', 'unicodelittleunmarked', 'utf_16le', 'u32', 'utf32', 'utf_32be', 'utf_32le', 'u7', 'utf7', 'unicode_1_1_utf_7', 'u8', 'utf', 'utf8', 'utf8_ucs2', 'utf8_ucs4', 'cp65001', 'uu', 'zip', 'zlib', 'x_mac_japanese', 'x_mac_korean', 'x_mac_simp_chinese', 'x_mac_trad_chinese'])"
217
+ ]
218
+ },
219
+ "execution_count": 12,
220
+ "metadata": {},
221
+ "output_type": "execute_result"
222
+ }
223
+ ],
224
+ "source": [
225
+ "l"
226
+ ]
227
+ },
228
+ {
229
+ "cell_type": "code",
230
+ "execution_count": 14,
231
+ "id": "ee8b9922",
232
+ "metadata": {},
233
+ "outputs": [
234
+ {
235
+ "name": "stdout",
236
+ "output_type": "stream",
237
+ "text": [
238
+ "646 is not encoding\n",
239
+ "ansi_x3.4_1968 is not encoding\n",
240
+ "ansi_x3_4_1968 is not encoding\n",
241
+ "ansi_x3.4_1986 is not encoding\n",
242
+ "cp367 is not encoding\n",
243
+ "csascii is not encoding\n",
244
+ "ibm367 is not encoding\n",
245
+ "iso646_us is not encoding\n",
246
+ "iso_646.irv_1991 is not encoding\n",
247
+ "iso_ir_6 is not encoding\n",
248
+ "us is not encoding\n",
249
+ "us_ascii is not encoding\n",
250
+ "base64 is not sutable\n",
251
+ "base_64 is not sutable\n",
252
+ "big5_tw is not encoding\n",
253
+ "csbig5 is not encoding\n",
254
+ "big5_hkscs is not encoding\n",
255
+ "hkscs is not encoding\n",
256
+ "bz2 is not sutable\n",
257
+ "037 is correctn encoding\n",
258
+ "csibm037 is correctn encoding\n",
259
+ "ebcdic_cp_ca is correctn encoding\n",
260
+ "ebcdic_cp_nl is correctn encoding\n",
261
+ "ebcdic_cp_us is correctn encoding\n",
262
+ "ebcdic_cp_wt is correctn encoding\n",
263
+ "ibm037 is correctn encoding\n",
264
+ "ibm039 is correctn encoding\n",
265
+ "1026 is correctn encoding\n",
266
+ "csibm1026 is correctn encoding\n",
267
+ "ibm1026 is correctn encoding\n",
268
+ "1125 is correctn encoding\n",
269
+ "ibm1125 is correctn encoding\n",
270
+ "cp866u is correctn encoding\n",
271
+ "ruscii is correctn encoding\n",
272
+ "1140 is correctn encoding\n",
273
+ "ibm1140 is correctn encoding\n",
274
+ "1250 is correctn encoding\n",
275
+ "windows_1250 is correctn encoding\n",
276
+ "1251 is correctn encoding\n",
277
+ "windows_1251 is correctn encoding\n",
278
+ "1252 is correctn encoding\n",
279
+ "windows_1252 is correctn encoding\n",
280
+ "1253 is not encoding\n",
281
+ "windows_1253 is not encoding\n",
282
+ "1254 is not encoding\n",
283
+ "windows_1254 is not encoding\n",
284
+ "1255 is not encoding\n",
285
+ "windows_1255 is not encoding\n",
286
+ "1256 is correctn encoding\n",
287
+ "windows_1256 is correctn encoding\n",
288
+ "1257 is correctn encoding\n",
289
+ "windows_1257 is correctn encoding\n",
290
+ "1258 is not encoding\n",
291
+ "windows_1258 is not encoding\n",
292
+ "273 is correctn encoding\n",
293
+ "ibm273 is correctn encoding\n",
294
+ "csibm273 is correctn encoding\n",
295
+ "424 is not encoding\n",
296
+ "csibm424 is not encoding\n",
297
+ "ebcdic_cp_he is not encoding\n",
298
+ "ibm424 is not encoding\n",
299
+ "437 is correctn encoding\n",
300
+ "cspc8codepage437 is correctn encoding\n",
301
+ "ibm437 is correctn encoding\n",
302
+ "500 is correctn encoding\n",
303
+ "csibm500 is correctn encoding\n",
304
+ "ebcdic_cp_be is correctn encoding\n",
305
+ "ebcdic_cp_ch is correctn encoding\n",
306
+ "ibm500 is correctn encoding\n",
307
+ "775 is correctn encoding\n",
308
+ "cspc775baltic is correctn encoding\n",
309
+ "ibm775 is correctn encoding\n",
310
+ "850 is correctn encoding\n",
311
+ "cspc850multilingual is correctn encoding\n",
312
+ "ibm850 is correctn encoding\n",
313
+ "852 is correctn encoding\n",
314
+ "cspcp852 is correctn encoding\n",
315
+ "ibm852 is correctn encoding\n",
316
+ "855 is correctn encoding\n",
317
+ "csibm855 is correctn encoding\n",
318
+ "ibm855 is correctn encoding\n",
319
+ "857 is not encoding\n",
320
+ "csibm857 is not encoding\n",
321
+ "ibm857 is not encoding\n",
322
+ "858 is correctn encoding\n",
323
+ "csibm858 is correctn encoding\n",
324
+ "ibm858 is correctn encoding\n",
325
+ "860 is correctn encoding\n",
326
+ "csibm860 is correctn encoding\n",
327
+ "ibm860 is correctn encoding\n",
328
+ "861 is correctn encoding\n",
329
+ "cp_is is correctn encoding\n",
330
+ "csibm861 is correctn encoding\n",
331
+ "ibm861 is correctn encoding\n",
332
+ "862 is correctn encoding\n",
333
+ "cspc862latinhebrew is correctn encoding\n",
334
+ "ibm862 is correctn encoding\n",
335
+ "863 is correctn encoding\n",
336
+ "csibm863 is correctn encoding\n",
337
+ "ibm863 is correctn encoding\n",
338
+ "864 is correctn encoding\n",
339
+ "csibm864 is correctn encoding\n",
340
+ "ibm864 is correctn encoding\n",
341
+ "865 is correctn encoding\n",
342
+ "csibm865 is correctn encoding\n",
343
+ "ibm865 is correctn encoding\n",
344
+ "866 is correctn encoding\n",
345
+ "csibm866 is correctn encoding\n",
346
+ "ibm866 is correctn encoding\n",
347
+ "869 is correctn encoding\n",
348
+ "cp_gr is correctn encoding\n",
349
+ "csibm869 is correctn encoding\n",
350
+ "ibm869 is correctn encoding\n",
351
+ "932 is not encoding\n",
352
+ "ms932 is not encoding\n",
353
+ "mskanji is not encoding\n",
354
+ "ms_kanji is not encoding\n",
355
+ "949 is not encoding\n",
356
+ "ms949 is not encoding\n",
357
+ "uhc is not encoding\n",
358
+ "950 is not encoding\n",
359
+ "ms950 is not encoding\n",
360
+ "jisx0213 is not encoding\n",
361
+ "eucjis2004 is not encoding\n",
362
+ "euc_jis2004 is not encoding\n",
363
+ "eucjisx0213 is not encoding\n",
364
+ "eucjp is not encoding\n",
365
+ "ujis is not encoding\n",
366
+ "u_jis is not encoding\n",
367
+ "euckr is not encoding\n",
368
+ "korean is not encoding\n",
369
+ "ksc5601 is not encoding\n",
370
+ "ks_c_5601 is not encoding\n",
371
+ "ks_c_5601_1987 is not encoding\n",
372
+ "ksx1001 is not encoding\n",
373
+ "ks_x_1001 is not encoding\n",
374
+ "gb18030_2000 is not encoding\n",
375
+ "chinese is not encoding\n",
376
+ "csiso58gb231280 is not encoding\n",
377
+ "euc_cn is not encoding\n",
378
+ "euccn is not encoding\n",
379
+ "eucgb2312_cn is not encoding\n",
380
+ "gb2312_1980 is not encoding\n",
381
+ "gb2312_80 is not encoding\n",
382
+ "iso_ir_58 is not encoding\n",
383
+ "936 is not encoding\n",
384
+ "cp936 is not encoding\n",
385
+ "ms936 is not encoding\n",
386
+ "hex is not sutable\n",
387
+ "roman8 is correctn encoding\n",
388
+ "r8 is correctn encoding\n",
389
+ "csHPRoman8 is not sutable\n",
390
+ "cp1051 is correctn encoding\n",
391
+ "ibm1051 is correctn encoding\n",
392
+ "hzgb is not encoding\n",
393
+ "hz_gb is not encoding\n",
394
+ "hz_gb_2312 is not encoding\n",
395
+ "csiso2022jp is not encoding\n",
396
+ "iso2022jp is not encoding\n",
397
+ "iso_2022_jp is not encoding\n",
398
+ "iso2022jp_1 is not encoding\n",
399
+ "iso_2022_jp_1 is not encoding\n",
400
+ "iso2022jp_2 is not encoding\n",
401
+ "iso_2022_jp_2 is not encoding\n",
402
+ "iso_2022_jp_2004 is not encoding\n",
403
+ "iso2022jp_2004 is not encoding\n",
404
+ "iso2022jp_3 is not encoding\n",
405
+ "iso_2022_jp_3 is not encoding\n",
406
+ "iso2022jp_ext is not encoding\n",
407
+ "iso_2022_jp_ext is not encoding\n",
408
+ "csiso2022kr is not encoding\n",
409
+ "iso2022kr is not encoding\n",
410
+ "iso_2022_kr is not encoding\n",
411
+ "csisolatin6 is correctn encoding\n",
412
+ "iso_8859_10 is correctn encoding\n",
413
+ "iso_8859_10_1992 is correctn encoding\n",
414
+ "iso_ir_157 is correctn encoding\n",
415
+ "l6 is correctn encoding\n",
416
+ "latin6 is correctn encoding\n",
417
+ "thai is not encoding\n",
418
+ "iso_8859_11 is not encoding\n",
419
+ "iso_8859_11_2001 is not encoding\n",
420
+ "iso_8859_13 is correctn encoding\n",
421
+ "l7 is correctn encoding\n",
422
+ "latin7 is correctn encoding\n",
423
+ "iso_8859_14 is correctn encoding\n",
424
+ "iso_8859_14_1998 is correctn encoding\n",
425
+ "iso_celtic is correctn encoding\n",
426
+ "iso_ir_199 is correctn encoding\n",
427
+ "l8 is correctn encoding\n",
428
+ "latin8 is correctn encoding\n",
429
+ "iso_8859_15 is correctn encoding\n",
430
+ "l9 is correctn encoding\n",
431
+ "latin9 is correctn encoding\n",
432
+ "iso_8859_16 is correctn encoding\n",
433
+ "iso_8859_16_2001 is correctn encoding\n",
434
+ "iso_ir_226 is correctn encoding\n",
435
+ "l10 is correctn encoding\n",
436
+ "latin10 is correctn encoding\n",
437
+ "csisolatin2 is correctn encoding\n",
438
+ "iso_8859_2 is correctn encoding\n",
439
+ "iso_8859_2_1987 is correctn encoding\n",
440
+ "iso_ir_101 is correctn encoding\n",
441
+ "l2 is correctn encoding\n",
442
+ "latin2 is correctn encoding\n",
443
+ "csisolatin3 is not encoding\n",
444
+ "iso_8859_3 is not encoding\n",
445
+ "iso_8859_3_1988 is not encoding\n",
446
+ "iso_ir_109 is not encoding\n",
447
+ "l3 is not encoding\n",
448
+ "latin3 is not encoding\n",
449
+ "csisolatin4 is correctn encoding\n",
450
+ "iso_8859_4 is correctn encoding\n",
451
+ "iso_8859_4_1988 is correctn encoding\n",
452
+ "iso_ir_110 is correctn encoding\n",
453
+ "l4 is correctn encoding\n",
454
+ "latin4 is correctn encoding\n",
455
+ "csisolatincyrillic is correctn encoding\n",
456
+ "cyrillic is correctn encoding\n",
457
+ "iso_8859_5 is correctn encoding\n",
458
+ "iso_8859_5_1988 is correctn encoding\n",
459
+ "iso_ir_144 is correctn encoding\n",
460
+ "arabic is not encoding\n",
461
+ "asmo_708 is not encoding\n",
462
+ "csisolatinarabic is not encoding\n",
463
+ "ecma_114 is not encoding\n",
464
+ "iso_8859_6 is not encoding\n",
465
+ "iso_8859_6_1987 is not encoding\n",
466
+ "iso_ir_127 is not encoding\n",
467
+ "csisolatingreek is not encoding\n",
468
+ "ecma_118 is not encoding\n",
469
+ "elot_928 is not encoding\n",
470
+ "greek is not encoding\n",
471
+ "greek8 is not encoding\n",
472
+ "iso_8859_7 is not encoding\n",
473
+ "iso_8859_7_1987 is not encoding\n",
474
+ "iso_ir_126 is not encoding\n",
475
+ "csisolatinhebrew is not encoding\n",
476
+ "hebrew is not encoding\n",
477
+ "iso_8859_8 is not encoding\n",
478
+ "iso_8859_8_1988 is not encoding\n",
479
+ "iso_ir_138 is not encoding\n",
480
+ "csisolatin5 is correctn encoding\n",
481
+ "iso_8859_9 is correctn encoding\n",
482
+ "iso_8859_9_1989 is correctn encoding\n",
483
+ "iso_ir_148 is correctn encoding\n",
484
+ "l5 is correctn encoding\n",
485
+ "latin5 is correctn encoding\n",
486
+ "cp1361 is not encoding\n",
487
+ "ms1361 is not encoding\n",
488
+ "cskoi8r is correctn encoding\n",
489
+ "kz_1048 is correctn encoding\n",
490
+ "rk1048 is correctn encoding\n",
491
+ "strk1048_2002 is correctn encoding\n",
492
+ "8859 is correctn encoding\n",
493
+ "cp819 is correctn encoding\n",
494
+ "csisolatin1 is correctn encoding\n",
495
+ "ibm819 is correctn encoding\n",
496
+ "iso8859 is correctn encoding\n",
497
+ "iso8859_1 is correctn encoding\n",
498
+ "iso_8859_1 is correctn encoding\n",
499
+ "iso_8859_1_1987 is correctn encoding\n",
500
+ "iso_ir_100 is correctn encoding\n",
501
+ "l1 is correctn encoding\n",
502
+ "latin is correctn encoding\n",
503
+ "latin1 is correctn encoding\n",
504
+ "maccyrillic is correctn encoding\n",
505
+ "macgreek is correctn encoding\n",
506
+ "maciceland is correctn encoding\n",
507
+ "maccentraleurope is correctn encoding\n",
508
+ "mac_centeuro is correctn encoding\n",
509
+ "maclatin2 is correctn encoding\n",
510
+ "macintosh is correctn encoding\n",
511
+ "macroman is correctn encoding\n",
512
+ "macturkish is correctn encoding\n",
513
+ "ansi is correctn encoding\n",
514
+ "dbcs is correctn encoding\n",
515
+ "csptcp154 is correctn encoding\n",
516
+ "pt154 is correctn encoding\n",
517
+ "cp154 is correctn encoding\n",
518
+ "cyrillic_asian is correctn encoding\n",
519
+ "quopri is not sutable\n",
520
+ "quoted_printable is not sutable\n",
521
+ "quotedprintable is not sutable\n",
522
+ "rot13 is not sutable\n",
523
+ "csshiftjis is not encoding\n",
524
+ "shiftjis is not encoding\n",
525
+ "sjis is not encoding\n",
526
+ "s_jis is not encoding\n",
527
+ "shiftjis2004 is not encoding\n",
528
+ "sjis_2004 is not encoding\n",
529
+ "s_jis_2004 is not encoding\n",
530
+ "shiftjisx0213 is not encoding\n",
531
+ "sjisx0213 is not encoding\n",
532
+ "s_jisx0213 is not encoding\n",
533
+ "tis620 is not encoding\n",
534
+ "tis_620_0 is not encoding\n",
535
+ "tis_620_2529_0 is not encoding\n",
536
+ "tis_620_2529_1 is not encoding\n",
537
+ "iso_ir_166 is not encoding\n",
538
+ "u16 is not encoding\n",
539
+ "utf16 is not encoding\n",
540
+ "unicodebigunmarked is not encoding\n",
541
+ "utf_16be is not encoding\n",
542
+ "unicodelittleunmarked is not encoding\n",
543
+ "utf_16le is not encoding\n",
544
+ "u32 is not encoding\n",
545
+ "utf32 is not encoding\n",
546
+ "utf_32be is not encoding\n",
547
+ "utf_32le is not encoding\n",
548
+ "u7 is not encoding\n",
549
+ "utf7 is not encoding\n",
550
+ "unicode_1_1_utf_7 is not encoding\n",
551
+ "u8 is not encoding\n",
552
+ "utf is not encoding\n",
553
+ "utf8 is not encoding\n",
554
+ "utf8_ucs2 is not encoding\n",
555
+ "utf8_ucs4 is not encoding\n",
556
+ "cp65001 is not encoding\n",
557
+ "uu is not sutable\n",
558
+ "zip is not sutable\n",
559
+ "zlib is not sutable\n",
560
+ "x_mac_japanese is not encoding\n",
561
+ "x_mac_korean is not encoding\n",
562
+ "x_mac_simp_chinese is not encoding\n",
563
+ "x_mac_trad_chinese is not encoding\n"
564
+ ]
565
+ }
566
+ ],
567
+ "source": [
568
+ "l1 =[]\n",
569
+ "for y in l:\n",
570
+ " try:\n",
571
+ " pd.read_csv(\"spam.csv\",encoding = y, on_bad_lines = \"skip\")\n",
572
+ " print(\"{} is correctn encoding\".format(y))\n",
573
+ " except UnicodeDecodeError:\n",
574
+ " print(\"{} is not encoding\".format(y))\n",
575
+ " except LookupError:\n",
576
+ " print(\"{} is not sutable\".format(y))\n",
577
+ " l1.append(y)"
578
+ ]
579
+ },
580
+ {
581
+ "cell_type": "code",
582
+ "execution_count": 16,
583
+ "id": "ef6f0ee4",
584
+ "metadata": {},
585
+ "outputs": [
586
+ {
587
+ "data": {
588
+ "text/plain": [
589
+ "['base64',\n",
590
+ " 'base_64',\n",
591
+ " 'bz2',\n",
592
+ " 'hex',\n",
593
+ " 'csHPRoman8',\n",
594
+ " 'quopri',\n",
595
+ " 'quoted_printable',\n",
596
+ " 'quotedprintable',\n",
597
+ " 'rot13',\n",
598
+ " 'uu',\n",
599
+ " 'zip',\n",
600
+ " 'zlib']"
601
+ ]
602
+ },
603
+ "execution_count": 16,
604
+ "metadata": {},
605
+ "output_type": "execute_result"
606
+ }
607
+ ],
608
+ "source": [
609
+ "l1"
610
+ ]
611
+ },
612
+ {
613
+ "cell_type": "code",
614
+ "execution_count": 18,
615
+ "id": "48f3d239",
616
+ "metadata": {},
617
+ "outputs": [],
618
+ "source": [
619
+ "data = pd.read_csv(\"spam.csv\",encoding = \"latin\")"
620
+ ]
621
+ },
622
+ {
623
+ "cell_type": "code",
624
+ "execution_count": 20,
625
+ "id": "8b11838b-4b81-437a-b0fd-23dd92e02b01",
626
+ "metadata": {},
627
+ "outputs": [
628
+ {
629
+ "data": {
630
+ "text/html": [
631
+ "<div>\n",
632
+ "<style scoped>\n",
633
+ " .dataframe tbody tr th:only-of-type {\n",
634
+ " vertical-align: middle;\n",
635
+ " }\n",
636
+ "\n",
637
+ " .dataframe tbody tr th {\n",
638
+ " vertical-align: top;\n",
639
+ " }\n",
640
+ "\n",
641
+ " .dataframe thead th {\n",
642
+ " text-align: right;\n",
643
+ " }\n",
644
+ "</style>\n",
645
+ "<table border=\"1\" class=\"dataframe\">\n",
646
+ " <thead>\n",
647
+ " <tr style=\"text-align: right;\">\n",
648
+ " <th></th>\n",
649
+ " <th>v1</th>\n",
650
+ " <th>v2</th>\n",
651
+ " <th>Unnamed: 2</th>\n",
652
+ " <th>Unnamed: 3</th>\n",
653
+ " <th>Unnamed: 4</th>\n",
654
+ " </tr>\n",
655
+ " </thead>\n",
656
+ " <tbody>\n",
657
+ " <tr>\n",
658
+ " <th>0</th>\n",
659
+ " <td>ham</td>\n",
660
+ " <td>Go until jurong point, crazy.. Available only ...</td>\n",
661
+ " <td>NaN</td>\n",
662
+ " <td>NaN</td>\n",
663
+ " <td>NaN</td>\n",
664
+ " </tr>\n",
665
+ " <tr>\n",
666
+ " <th>1</th>\n",
667
+ " <td>ham</td>\n",
668
+ " <td>Ok lar... Joking wif u oni...</td>\n",
669
+ " <td>NaN</td>\n",
670
+ " <td>NaN</td>\n",
671
+ " <td>NaN</td>\n",
672
+ " </tr>\n",
673
+ " <tr>\n",
674
+ " <th>2</th>\n",
675
+ " <td>spam</td>\n",
676
+ " <td>Free entry in 2 a wkly comp to win FA Cup fina...</td>\n",
677
+ " <td>NaN</td>\n",
678
+ " <td>NaN</td>\n",
679
+ " <td>NaN</td>\n",
680
+ " </tr>\n",
681
+ " <tr>\n",
682
+ " <th>3</th>\n",
683
+ " <td>ham</td>\n",
684
+ " <td>U dun say so early hor... U c already then say...</td>\n",
685
+ " <td>NaN</td>\n",
686
+ " <td>NaN</td>\n",
687
+ " <td>NaN</td>\n",
688
+ " </tr>\n",
689
+ " <tr>\n",
690
+ " <th>4</th>\n",
691
+ " <td>ham</td>\n",
692
+ " <td>Nah I don't think he goes to usf, he lives aro...</td>\n",
693
+ " <td>NaN</td>\n",
694
+ " <td>NaN</td>\n",
695
+ " <td>NaN</td>\n",
696
+ " </tr>\n",
697
+ " <tr>\n",
698
+ " <th>...</th>\n",
699
+ " <td>...</td>\n",
700
+ " <td>...</td>\n",
701
+ " <td>...</td>\n",
702
+ " <td>...</td>\n",
703
+ " <td>...</td>\n",
704
+ " </tr>\n",
705
+ " <tr>\n",
706
+ " <th>5567</th>\n",
707
+ " <td>spam</td>\n",
708
+ " <td>This is the 2nd time we have tried 2 contact u...</td>\n",
709
+ " <td>NaN</td>\n",
710
+ " <td>NaN</td>\n",
711
+ " <td>NaN</td>\n",
712
+ " </tr>\n",
713
+ " <tr>\n",
714
+ " <th>5568</th>\n",
715
+ " <td>ham</td>\n",
716
+ " <td>Will Ì_ b going to esplanade fr home?</td>\n",
717
+ " <td>NaN</td>\n",
718
+ " <td>NaN</td>\n",
719
+ " <td>NaN</td>\n",
720
+ " </tr>\n",
721
+ " <tr>\n",
722
+ " <th>5569</th>\n",
723
+ " <td>ham</td>\n",
724
+ " <td>Pity, * was in mood for that. So...any other s...</td>\n",
725
+ " <td>NaN</td>\n",
726
+ " <td>NaN</td>\n",
727
+ " <td>NaN</td>\n",
728
+ " </tr>\n",
729
+ " <tr>\n",
730
+ " <th>5570</th>\n",
731
+ " <td>ham</td>\n",
732
+ " <td>The guy did some bitching but I acted like i'd...</td>\n",
733
+ " <td>NaN</td>\n",
734
+ " <td>NaN</td>\n",
735
+ " <td>NaN</td>\n",
736
+ " </tr>\n",
737
+ " <tr>\n",
738
+ " <th>5571</th>\n",
739
+ " <td>ham</td>\n",
740
+ " <td>Rofl. Its true to its name</td>\n",
741
+ " <td>NaN</td>\n",
742
+ " <td>NaN</td>\n",
743
+ " <td>NaN</td>\n",
744
+ " </tr>\n",
745
+ " </tbody>\n",
746
+ "</table>\n",
747
+ "<p>5572 rows × 5 columns</p>\n",
748
+ "</div>"
749
+ ],
750
+ "text/plain": [
751
+ " v1 v2 Unnamed: 2 \\\n",
752
+ "0 ham Go until jurong point, crazy.. Available only ... NaN \n",
753
+ "1 ham Ok lar... Joking wif u oni... NaN \n",
754
+ "2 spam Free entry in 2 a wkly comp to win FA Cup fina... NaN \n",
755
+ "3 ham U dun say so early hor... U c already then say... NaN \n",
756
+ "4 ham Nah I don't think he goes to usf, he lives aro... NaN \n",
757
+ "... ... ... ... \n",
758
+ "5567 spam This is the 2nd time we have tried 2 contact u... NaN \n",
759
+ "5568 ham Will Ì_ b going to esplanade fr home? NaN \n",
760
+ "5569 ham Pity, * was in mood for that. So...any other s... NaN \n",
761
+ "5570 ham The guy did some bitching but I acted like i'd... NaN \n",
762
+ "5571 ham Rofl. Its true to its name NaN \n",
763
+ "\n",
764
+ " Unnamed: 3 Unnamed: 4 \n",
765
+ "0 NaN NaN \n",
766
+ "1 NaN NaN \n",
767
+ "2 NaN NaN \n",
768
+ "3 NaN NaN \n",
769
+ "4 NaN NaN \n",
770
+ "... ... ... \n",
771
+ "5567 NaN NaN \n",
772
+ "5568 NaN NaN \n",
773
+ "5569 NaN NaN \n",
774
+ "5570 NaN NaN \n",
775
+ "5571 NaN NaN \n",
776
+ "\n",
777
+ "[5572 rows x 5 columns]"
778
+ ]
779
+ },
780
+ "execution_count": 20,
781
+ "metadata": {},
782
+ "output_type": "execute_result"
783
+ }
784
+ ],
785
+ "source": [
786
+ "data"
787
+ ]
788
+ },
789
+ {
790
+ "cell_type": "code",
791
+ "execution_count": 22,
792
+ "id": "1c25f035",
793
+ "metadata": {},
794
+ "outputs": [
795
+ {
796
+ "data": {
797
+ "text/plain": [
798
+ "(5572, 5)"
799
+ ]
800
+ },
801
+ "execution_count": 22,
802
+ "metadata": {},
803
+ "output_type": "execute_result"
804
+ }
805
+ ],
806
+ "source": [
807
+ "data.shape"
808
+ ]
809
+ },
810
+ {
811
+ "cell_type": "code",
812
+ "execution_count": 24,
813
+ "id": "3a50f2eb",
814
+ "metadata": {},
815
+ "outputs": [
816
+ {
817
+ "name": "stdout",
818
+ "output_type": "stream",
819
+ "text": [
820
+ " v1 v2 Unnamed: 2 \\\n",
821
+ "0 ham Go until jurong point, crazy.. Available only ... NaN \n",
822
+ "1 ham Ok lar... Joking wif u oni... NaN \n",
823
+ "\n",
824
+ " Unnamed: 3 Unnamed: 4 \n",
825
+ "0 NaN NaN \n",
826
+ "1 NaN NaN \n",
827
+ "**************************************************\n",
828
+ " v1 v2 Unnamed: 2 \\\n",
829
+ "100 ham Okay name ur price as long as its legal! Wen c... NaN \n",
830
+ "101 ham I'm still looking for a car to buy. And have n... NaN \n",
831
+ "\n",
832
+ " Unnamed: 3 Unnamed: 4 \n",
833
+ "100 NaN NaN \n",
834
+ "101 NaN NaN \n",
835
+ "**************************************************\n",
836
+ " v1 v2 Unnamed: 2 \\\n",
837
+ "200 ham I sent you &lt;#&gt; bucks NaN \n",
838
+ "201 ham Hello darlin ive finished college now so txt m... NaN \n",
839
+ "\n",
840
+ " Unnamed: 3 Unnamed: 4 \n",
841
+ "200 NaN NaN \n",
842
+ "201 NaN NaN \n",
843
+ "**************************************************\n",
844
+ " v1 v2 Unnamed: 2 \\\n",
845
+ "300 ham Awesome, I remember the last time we got someb... NaN \n",
846
+ "301 ham Shit that is really shocking and scary, cant i... NaN \n",
847
+ "\n",
848
+ " Unnamed: 3 Unnamed: 4 \n",
849
+ "300 NaN NaN \n",
850
+ "301 NaN NaN \n",
851
+ "**************************************************\n",
852
+ " v1 v2 Unnamed: 2 \\\n",
853
+ "400 spam FREE RINGTONE text FIRST to 87131 for a poly o... NaN \n",
854
+ "401 ham Dear how is chechi. Did you talk to her NaN \n",
855
+ "\n",
856
+ " Unnamed: 3 Unnamed: 4 \n",
857
+ "400 NaN NaN \n",
858
+ "401 NaN NaN \n",
859
+ "**************************************************\n",
860
+ " v1 v2 Unnamed: 2 \\\n",
861
+ "500 ham Fighting with the world is easy, u either win ... NaN \n",
862
+ "501 ham When can Ì_ come out? NaN \n",
863
+ "\n",
864
+ " Unnamed: 3 Unnamed: 4 \n",
865
+ "500 NaN NaN \n",
866
+ "501 NaN NaN \n",
867
+ "**************************************************\n",
868
+ " v1 v2 Unnamed: 2 \\\n",
869
+ "600 ham Mind blastin.. No more Tsunamis will occur fro... NaN \n",
870
+ "601 ham If u sending her home first it's ok lor. I'm n... NaN \n",
871
+ "\n",
872
+ " Unnamed: 3 Unnamed: 4 \n",
873
+ "600 NaN NaN \n",
874
+ "601 NaN NaN \n",
875
+ "**************************************************\n",
876
+ " v1 v2 Unnamed: 2 Unnamed: 3 Unnamed: 4\n",
877
+ "700 ham How much r Ì_ willing to pay? NaN NaN NaN\n",
878
+ "701 ham Sorry, I'll call later NaN NaN NaN\n",
879
+ "**************************************************\n",
880
+ " v1 v2 Unnamed: 2 \\\n",
881
+ "800 spam Last Chance! Claim ur å£150 worth of discount ... NaN \n",
882
+ "801 ham Appt is at &lt;TIME&gt; am. Not my fault u don... NaN \n",
883
+ "\n",
884
+ " Unnamed: 3 Unnamed: 4 \n",
885
+ "800 NaN NaN \n",
886
+ "801 NaN NaN \n",
887
+ "**************************************************\n",
888
+ " v1 v2 Unnamed: 2 \\\n",
889
+ "900 ham Probably money worries. Things are coming due ... NaN \n",
890
+ "901 ham How is it possible to teach you. And where. NaN \n",
891
+ "\n",
892
+ " Unnamed: 3 Unnamed: 4 \n",
893
+ "900 NaN NaN \n",
894
+ "901 NaN NaN \n",
895
+ "**************************************************\n",
896
+ " v1 v2 Unnamed: 2 \\\n",
897
+ "1000 ham No..but heard abt tat.. NaN \n",
898
+ "1001 spam Please call our customer service representativ... NaN \n",
899
+ "\n",
900
+ " Unnamed: 3 Unnamed: 4 \n",
901
+ "1000 NaN NaN \n",
902
+ "1001 NaN NaN \n",
903
+ "**************************************************\n",
904
+ " v1 v2 Unnamed: 2 \\\n",
905
+ "1100 ham You busy or can I come by at some point and fi... NaN \n",
906
+ "1101 ham Yeah go on then, bored and depressed sittin wa... NaN \n",
907
+ "\n",
908
+ " Unnamed: 3 Unnamed: 4 \n",
909
+ "1100 NaN NaN \n",
910
+ "1101 NaN NaN \n",
911
+ "**************************************************\n",
912
+ " v1 v2 Unnamed: 2 Unnamed: 3 \\\n",
913
+ "1200 ham Otherwise had part time job na-tuition.. NaN NaN \n",
914
+ "1201 ham I know she called me NaN NaN \n",
915
+ "\n",
916
+ " Unnamed: 4 \n",
917
+ "1200 NaN \n",
918
+ "1201 NaN \n",
919
+ "**************************************************\n",
920
+ " v1 v2 Unnamed: 2 \\\n",
921
+ "1300 ham Those cocksuckers. If it makes you feel better... NaN \n",
922
+ "1301 ham I tot u reach liao. He said t-shirt. NaN \n",
923
+ "\n",
924
+ " Unnamed: 3 Unnamed: 4 \n",
925
+ "1300 NaN NaN \n",
926
+ "1301 NaN NaN \n",
927
+ "**************************************************\n",
928
+ " v1 v2 Unnamed: 2 \\\n",
929
+ "1400 ham No, I decided that only people who care about ... NaN \n",
930
+ "1401 ham Kaiez... Enjoy ur tuition... Gee... Thk e seco... NaN \n",
931
+ "\n",
932
+ " Unnamed: 3 Unnamed: 4 \n",
933
+ "1400 NaN NaN \n",
934
+ "1401 NaN NaN \n",
935
+ "**************************************************\n",
936
+ " v1 v2 Unnamed: 2 \\\n",
937
+ "1500 ham Host-based IDPS for linux systems. NaN \n",
938
+ "1501 spam HOT LIVE FANTASIES call now 08707509020 Just 2... NaN \n",
939
+ "\n",
940
+ " Unnamed: 3 Unnamed: 4 \n",
941
+ "1500 NaN NaN \n",
942
+ "1501 NaN NaN \n",
943
+ "**************************************************\n",
944
+ " v1 v2 Unnamed: 2 \\\n",
945
+ "1600 ham K.then any other special? NaN \n",
946
+ "1601 ham Carlos is taking his sweet time as usual so le... NaN \n",
947
+ "\n",
948
+ " Unnamed: 3 Unnamed: 4 \n",
949
+ "1600 NaN NaN \n",
950
+ "1601 NaN NaN \n",
951
+ "**************************************************\n",
952
+ " v1 v2 Unnamed: 2 \\\n",
953
+ "1700 ham Please ask mummy to call father NaN \n",
954
+ "1701 ham Can come my room but cannot come my house cos ... NaN \n",
955
+ "\n",
956
+ " Unnamed: 3 Unnamed: 4 \n",
957
+ "1700 NaN NaN \n",
958
+ "1701 NaN NaN \n",
959
+ "**************************************************\n",
960
+ " v1 v2 Unnamed: 2 \\\n",
961
+ "1800 ham excellent. I spent &lt;#&gt; years in the Ai... NaN \n",
962
+ "1801 ham I wanna watch that movie NaN \n",
963
+ "\n",
964
+ " Unnamed: 3 Unnamed: 4 \n",
965
+ "1800 NaN NaN \n",
966
+ "1801 NaN NaN \n",
967
+ "**************************************************\n",
968
+ " v1 v2 Unnamed: 2 \\\n",
969
+ "1900 ham And miss vday the parachute and double coins??... NaN \n",
970
+ "1901 ham Sorry, I'll call later NaN \n",
971
+ "\n",
972
+ " Unnamed: 3 Unnamed: 4 \n",
973
+ "1900 NaN NaN \n",
974
+ "1901 NaN NaN \n",
975
+ "**************************************************\n",
976
+ " v1 v2 Unnamed: 2 \\\n",
977
+ "2000 ham But i'll b going 2 sch on mon. My sis need 2 t... NaN \n",
978
+ "2001 ham Idea will soon get converted to live:) NaN \n",
979
+ "\n",
980
+ " Unnamed: 3 Unnamed: 4 \n",
981
+ "2000 NaN NaN \n",
982
+ "2001 NaN NaN \n",
983
+ "**************************************************\n",
984
+ " v1 v2 Unnamed: 2 \\\n",
985
+ "2100 ham Oh Howda gud gud.. Mathe en samachara chikku:-) NaN \n",
986
+ "2101 ham I thk 530 lor. But dunno can get tickets a not... NaN \n",
987
+ "\n",
988
+ " Unnamed: 3 Unnamed: 4 \n",
989
+ "2100 NaN NaN \n",
990
+ "2101 NaN NaN \n",
991
+ "**************************************************\n",
992
+ " v1 v2 Unnamed: 2 \\\n",
993
+ "2200 ham Haha... can... But i'm having dinner with my c... NaN \n",
994
+ "2201 ham A boy was late 2 home. His father: \\POWER OF F... NaN \n",
995
+ "\n",
996
+ " Unnamed: 3 Unnamed: 4 \n",
997
+ "2200 NaN NaN \n",
998
+ "2201 NaN NaN \n",
999
+ "**************************************************\n",
1000
+ " v1 v2 Unnamed: 2 \\\n",
1001
+ "2300 ham Nothin comes to my mind. ÌÏ help me buy hanger... NaN \n",
1002
+ "2301 ham &lt;#&gt; , that's all? Guess that's easy enough NaN \n",
1003
+ "\n",
1004
+ " Unnamed: 3 Unnamed: 4 \n",
1005
+ "2300 NaN NaN \n",
1006
+ "2301 NaN NaN \n",
1007
+ "**************************************************\n",
1008
+ " v1 v2 Unnamed: 2 \\\n",
1009
+ "2400 ham Hi! This is Roger from CL. How are you? NaN \n",
1010
+ "2401 spam Babe: U want me dont u baby! Im nasty and have... NaN \n",
1011
+ "\n",
1012
+ " Unnamed: 3 Unnamed: 4 \n",
1013
+ "2400 NaN NaN \n",
1014
+ "2401 NaN NaN \n",
1015
+ "**************************************************\n",
1016
+ " v1 v2 Unnamed: 2 Unnamed: 3 \\\n",
1017
+ "2500 ham Remember to ask alex about his pizza NaN NaN \n",
1018
+ "2501 ham No da..today also i forgot.. NaN NaN \n",
1019
+ "\n",
1020
+ " Unnamed: 4 \n",
1021
+ "2500 NaN \n",
1022
+ "2501 NaN \n",
1023
+ "**************************************************\n",
1024
+ " v1 v2 Unnamed: 2 \\\n",
1025
+ "2600 ham As usual..iam fine, happy &amp; doing well..:) NaN \n",
1026
+ "2601 ham Okie NaN \n",
1027
+ "\n",
1028
+ " Unnamed: 3 Unnamed: 4 \n",
1029
+ "2600 NaN NaN \n",
1030
+ "2601 NaN NaN \n",
1031
+ "**************************************************\n",
1032
+ " v1 v2 Unnamed: 2 \\\n",
1033
+ "2700 ham Feb &lt;#&gt; is \\I LOVE U\\\" day. Send dis t... NaN \n",
1034
+ "2701 ham Hiya, sorry didn't hav signal. I haven't seen ... NaN \n",
1035
+ "\n",
1036
+ " Unnamed: 3 Unnamed: 4 \n",
1037
+ "2700 NaN NaN \n",
1038
+ "2701 NaN NaN \n",
1039
+ "**************************************************\n",
1040
+ " v1 v2 Unnamed: 2 \\\n",
1041
+ "2800 ham Depends on where u going lor. NaN \n",
1042
+ "2801 ham And smile for me right now as you go and the w... NaN \n",
1043
+ "\n",
1044
+ " Unnamed: 3 Unnamed: 4 \n",
1045
+ "2800 NaN NaN \n",
1046
+ "2801 NaN NaN \n",
1047
+ "**************************************************\n",
1048
+ " v1 v2 Unnamed: 2 \\\n",
1049
+ "2900 spam Ur cash-balance is currently 500 pounds - to m... NaN \n",
1050
+ "2901 ham Bill, as in: Are there any letters for me. i‰Û... NaN \n",
1051
+ "\n",
1052
+ " Unnamed: 3 Unnamed: 4 \n",
1053
+ "2900 NaN NaN \n",
1054
+ "2901 NaN NaN \n",
1055
+ "**************************************************\n",
1056
+ " v1 v2 Unnamed: 2 \\\n",
1057
+ "3000 spam This message is free. Welcome to the new & imp... NaN \n",
1058
+ "3001 ham Excellent, I'll see what riley's plans are NaN \n",
1059
+ "\n",
1060
+ " Unnamed: 3 Unnamed: 4 \n",
1061
+ "3000 NaN NaN \n",
1062
+ "3001 NaN NaN \n",
1063
+ "**************************************************\n",
1064
+ " v1 v2 Unnamed: 2 \\\n",
1065
+ "3100 ham Pathaya enketa maraikara pa' NaN \n",
1066
+ "3101 ham Even if he my friend he is a priest call him now NaN \n",
1067
+ "\n",
1068
+ " Unnamed: 3 Unnamed: 4 \n",
1069
+ "3100 NaN NaN \n",
1070
+ "3101 NaN NaN \n",
1071
+ "**************************************************\n",
1072
+ " v1 v2 Unnamed: 2 \\\n",
1073
+ "3200 ham Nice.nice.how is it working? NaN \n",
1074
+ "3201 ham Okay lor... Wah... like that def they wont let... NaN \n",
1075
+ "\n",
1076
+ " Unnamed: 3 Unnamed: 4 \n",
1077
+ "3200 NaN NaN \n",
1078
+ "3201 NaN NaN \n",
1079
+ "**************************************************\n",
1080
+ " v1 v2 Unnamed: 2 \\\n",
1081
+ "3300 spam RCT' THNQ Adrian for U text. Rgds Vatian NaN \n",
1082
+ "3301 ham Stop calling everyone saying I might have canc... NaN \n",
1083
+ "\n",
1084
+ " Unnamed: 3 Unnamed: 4 \n",
1085
+ "3300 NaN NaN \n",
1086
+ "3301 NaN NaN \n",
1087
+ "**************************************************\n",
1088
+ " v1 v2 Unnamed: 2 \\\n",
1089
+ "3400 ham Thanks honey. Have a great day. NaN \n",
1090
+ "3401 ham 'An Amazing Quote'' - \\Sometimes in life its d... NaN \n",
1091
+ "\n",
1092
+ " Unnamed: 3 Unnamed: 4 \n",
1093
+ "3400 NaN NaN \n",
1094
+ "3401 NaN NaN \n",
1095
+ "**************************************************\n",
1096
+ " v1 v2 Unnamed: 2 \\\n",
1097
+ "3500 ham says the &lt;#&gt; year old with a man and m... NaN \n",
1098
+ "3501 ham I will come to ur home now NaN \n",
1099
+ "\n",
1100
+ " Unnamed: 3 Unnamed: 4 \n",
1101
+ "3500 NaN NaN \n",
1102
+ "3501 NaN NaN \n",
1103
+ "**************************************************\n",
1104
+ " v1 v2 Unnamed: 2 \\\n",
1105
+ "3600 ham Jay told me already, will do NaN \n",
1106
+ "3601 ham Cps is causing the outages to conserve energy. NaN \n",
1107
+ "\n",
1108
+ " Unnamed: 3 Unnamed: 4 \n",
1109
+ "3600 NaN NaN \n",
1110
+ "3601 NaN NaN \n",
1111
+ "**************************************************\n",
1112
+ " v1 v2 Unnamed: 2 \\\n",
1113
+ "3700 ham Shall i get my pouch? NaN \n",
1114
+ "3701 ham Hey loverboy! I love you !! I had to tell ... ... NaN \n",
1115
+ "\n",
1116
+ " Unnamed: 3 Unnamed: 4 \n",
1117
+ "3700 NaN NaN \n",
1118
+ "3701 NaN NaN \n",
1119
+ "**************************************************\n",
1120
+ " v1 v2 Unnamed: 2 Unnamed: 3 \\\n",
1121
+ "3800 ham It's ok, at least armand's still around NaN NaN \n",
1122
+ "3801 ham No da. I am happy that we sit together na NaN NaN \n",
1123
+ "\n",
1124
+ " Unnamed: 4 \n",
1125
+ "3800 NaN \n",
1126
+ "3801 NaN \n",
1127
+ "**************************************************\n",
1128
+ " v1 v2 Unnamed: 2 \\\n",
1129
+ "3900 ham That depends. How would you like to be treated... NaN \n",
1130
+ "3901 ham Right on brah, see you later NaN \n",
1131
+ "\n",
1132
+ " Unnamed: 3 Unnamed: 4 \n",
1133
+ "3900 NaN NaN \n",
1134
+ "3901 NaN NaN \n",
1135
+ "**************************************************\n",
1136
+ " v1 v2 Unnamed: 2 \\\n",
1137
+ "4000 ham He's just gonna worry for nothing. And he won'... NaN \n",
1138
+ "4001 ham Did you get any gift? This year i didnt get an... NaN \n",
1139
+ "\n",
1140
+ " Unnamed: 3 Unnamed: 4 \n",
1141
+ "4000 NaN NaN \n",
1142
+ "4001 NaN NaN \n",
1143
+ "**************************************************\n",
1144
+ " v1 v2 Unnamed: 2 \\\n",
1145
+ "4100 spam GSOH? Good with SPAM the ladies?U could b a ma... NaN \n",
1146
+ "4101 ham Ok then i will come to ur home after half an hour NaN \n",
1147
+ "\n",
1148
+ " Unnamed: 3 Unnamed: 4 \n",
1149
+ "4100 NaN NaN \n",
1150
+ "4101 NaN NaN \n",
1151
+ "**************************************************\n",
1152
+ " v1 v2 Unnamed: 2 \\\n",
1153
+ "4200 ham Wylie update: my weed dealer carlos went to fr... NaN \n",
1154
+ "4201 ham Are you happy baby ? Are you alright ? Did you... NaN \n",
1155
+ "\n",
1156
+ " Unnamed: 3 Unnamed: 4 \n",
1157
+ "4200 NaN NaN \n",
1158
+ "4201 NaN NaN \n",
1159
+ "**************************************************\n",
1160
+ " v1 v2 Unnamed: 2 \\\n",
1161
+ "4300 ham Are there TA jobs available? Let me know pleas... NaN \n",
1162
+ "4301 ham Aiyar hard 2 type. U later free then tell me t... NaN \n",
1163
+ "\n",
1164
+ " Unnamed: 3 Unnamed: 4 \n",
1165
+ "4300 NaN NaN \n",
1166
+ "4301 NaN NaN \n",
1167
+ "**************************************************\n",
1168
+ " v1 v2 Unnamed: 2 \\\n",
1169
+ "4400 ham Many times we lose our best ones bcoz we are NaN \n",
1170
+ "4401 ham Good FRIENDS CaRE for each Other.. CLoSE Frien... NaN \n",
1171
+ "\n",
1172
+ " Unnamed: 3 Unnamed: 4 \n",
1173
+ "4400 NaN NaN \n",
1174
+ "4401 NaN NaN \n",
1175
+ "**************************************************\n",
1176
+ " v1 v2 Unnamed: 2 Unnamed: 3 Unnamed: 4\n",
1177
+ "4500 ham So wat's da decision? NaN NaN NaN\n",
1178
+ "4501 ham Wot is u up 2 then bitch? NaN NaN NaN\n",
1179
+ "**************************************************\n",
1180
+ " v1 v2 \\\n",
1181
+ "4600 spam FreeMsg: Txt: CALL to No: 86888 & claim your r... \n",
1182
+ "4601 ham \\Hey j! r u feeling any better \n",
1183
+ "\n",
1184
+ " Unnamed: 2 Unnamed: 3 Unnamed: 4 \n",
1185
+ "4600 NaN NaN NaN \n",
1186
+ "4601 hopeSo hunny. i amnow feelin ill & ithink i m... NaN NaN \n",
1187
+ "**************************************************\n",
1188
+ " v1 v2 Unnamed: 2 Unnamed: 3 Unnamed: 4\n",
1189
+ "4700 ham I liked the new mobile NaN NaN NaN\n",
1190
+ "4701 ham Anytime... NaN NaN NaN\n",
1191
+ "**************************************************\n",
1192
+ " v1 v2 Unnamed: 2 \\\n",
1193
+ "4800 ham The guy at the car shop who was flirting with ... NaN \n",
1194
+ "4801 ham Reverse is cheating. That is not mathematics. NaN \n",
1195
+ "\n",
1196
+ " Unnamed: 3 Unnamed: 4 \n",
1197
+ "4800 NaN NaN \n",
1198
+ "4801 NaN NaN \n",
1199
+ "**************************************************\n",
1200
+ " v1 v2 Unnamed: 2 \\\n",
1201
+ "4900 ham Taka lor. Wat time u wan 2 come n look 4 us? NaN \n",
1202
+ "4901 spam * FREE* POLYPHONIC RINGTONE Text SUPER to 8713... NaN \n",
1203
+ "\n",
1204
+ " Unnamed: 3 Unnamed: 4 \n",
1205
+ "4900 NaN NaN \n",
1206
+ "4901 NaN NaN \n",
1207
+ "**************************************************\n",
1208
+ " v1 v2 Unnamed: 2 \\\n",
1209
+ "5000 ham Nope. Since ayo travelled, he has forgotten hi... NaN \n",
1210
+ "5001 ham You still around? Looking to pick up later NaN \n",
1211
+ "\n",
1212
+ " Unnamed: 3 Unnamed: 4 \n",
1213
+ "5000 NaN NaN \n",
1214
+ "5001 NaN NaN \n",
1215
+ "**************************************************\n",
1216
+ " v1 v2 Unnamed: 2 Unnamed: 3 \\\n",
1217
+ "5100 ham Aight, call me once you're close NaN NaN \n",
1218
+ "5101 ham Nope thats fine. I might have a nap tho! NaN NaN \n",
1219
+ "\n",
1220
+ " Unnamed: 4 \n",
1221
+ "5100 NaN \n",
1222
+ "5101 NaN \n",
1223
+ "**************************************************\n",
1224
+ " v1 v2 Unnamed: 2 \\\n",
1225
+ "5200 spam Call Germany for only 1 pence per minute! Call... NaN \n",
1226
+ "5201 spam YOU VE WON! Your 4* Costa Del Sol Holiday or å... NaN \n",
1227
+ "\n",
1228
+ " Unnamed: 3 Unnamed: 4 \n",
1229
+ "5200 NaN NaN \n",
1230
+ "5201 NaN NaN \n",
1231
+ "**************************************************\n",
1232
+ " v1 v2 Unnamed: 2 Unnamed: 3 \\\n",
1233
+ "5300 ham I can't make it tonight NaN NaN \n",
1234
+ "5301 ham At WHAT TIME should i come tomorrow NaN NaN \n",
1235
+ "\n",
1236
+ " Unnamed: 4 \n",
1237
+ "5300 NaN \n",
1238
+ "5301 NaN \n",
1239
+ "**************************************************\n",
1240
+ " v1 v2 Unnamed: 2 \\\n",
1241
+ "5400 ham HARD BUT TRUE: How much you show &amp; expres... NaN \n",
1242
+ "5401 ham Babes I think I got ur brolly I left it in Eng... NaN \n",
1243
+ "\n",
1244
+ " Unnamed: 3 Unnamed: 4 \n",
1245
+ "5400 NaN NaN \n",
1246
+ "5401 NaN NaN \n",
1247
+ "**************************************************\n",
1248
+ " v1 v2 Unnamed: 2 \\\n",
1249
+ "5500 ham Love has one law; Make happy the person you lo... NaN \n",
1250
+ "5501 spam PRIVATE! Your 2003 Account Statement for 07808... NaN \n",
1251
+ "\n",
1252
+ " Unnamed: 3 Unnamed: 4 \n",
1253
+ "5500 NaN NaN \n",
1254
+ "5501 NaN NaN \n",
1255
+ "**************************************************\n"
1256
+ ]
1257
+ }
1258
+ ],
1259
+ "source": [
1260
+ "files = pd.read_csv(\"spam.csv\",encoding = \"latin\",chunksize = 100)\n",
1261
+ "\n",
1262
+ "for chunk in files:\n",
1263
+ " print(chunk.head(2))\n",
1264
+ " print(\"*\"*50)"
1265
+ ]
1266
+ },
1267
+ {
1268
+ "cell_type": "code",
1269
+ "execution_count": 26,
1270
+ "id": "16957b05",
1271
+ "metadata": {},
1272
+ "outputs": [
1273
+ {
1274
+ "name": "stdout",
1275
+ "output_type": "stream",
1276
+ "text": [
1277
+ " v1 v2 Unnamed: 2 \\\n",
1278
+ "0 ham Go until jurong point, crazy.. Available only ... NaN \n",
1279
+ "1 ham Ok lar... Joking wif u oni... NaN \n",
1280
+ "\n",
1281
+ " Unnamed: 3 Unnamed: 4 \n",
1282
+ "0 NaN NaN \n",
1283
+ "1 NaN NaN \n",
1284
+ "**************************************************\n",
1285
+ " v1 v2 Unnamed: 2 \\\n",
1286
+ "100 ham Okay name ur price as long as its legal! Wen c... NaN \n",
1287
+ "101 ham I'm still looking for a car to buy. And have n... NaN \n",
1288
+ "\n",
1289
+ " Unnamed: 3 Unnamed: 4 \n",
1290
+ "100 NaN NaN \n",
1291
+ "101 NaN NaN \n",
1292
+ "**************************************************\n",
1293
+ " v1 v2 Unnamed: 2 \\\n",
1294
+ "200 ham I sent you &lt;#&gt; bucks NaN \n",
1295
+ "201 ham Hello darlin ive finished college now so txt m... NaN \n",
1296
+ "\n",
1297
+ " Unnamed: 3 Unnamed: 4 \n",
1298
+ "200 NaN NaN \n",
1299
+ "201 NaN NaN \n",
1300
+ "**************************************************\n",
1301
+ " v1 v2 Unnamed: 2 \\\n",
1302
+ "300 ham Awesome, I remember the last time we got someb... NaN \n",
1303
+ "301 ham Shit that is really shocking and scary, cant i... NaN \n",
1304
+ "\n",
1305
+ " Unnamed: 3 Unnamed: 4 \n",
1306
+ "300 NaN NaN \n",
1307
+ "301 NaN NaN \n",
1308
+ "**************************************************\n",
1309
+ " v1 v2 Unnamed: 2 \\\n",
1310
+ "400 spam FREE RINGTONE text FIRST to 87131 for a poly o... NaN \n",
1311
+ "401 ham Dear how is chechi. Did you talk to her NaN \n",
1312
+ "\n",
1313
+ " Unnamed: 3 Unnamed: 4 \n",
1314
+ "400 NaN NaN \n",
1315
+ "401 NaN NaN \n",
1316
+ "**************************************************\n",
1317
+ " v1 v2 Unnamed: 2 \\\n",
1318
+ "500 ham Fighting with the world is easy, u either win ... NaN \n",
1319
+ "501 ham When can Ì_ come out? NaN \n",
1320
+ "\n",
1321
+ " Unnamed: 3 Unnamed: 4 \n",
1322
+ "500 NaN NaN \n",
1323
+ "501 NaN NaN \n",
1324
+ "**************************************************\n",
1325
+ " v1 v2 Unnamed: 2 \\\n",
1326
+ "600 ham Mind blastin.. No more Tsunamis will occur fro... NaN \n",
1327
+ "601 ham If u sending her home first it's ok lor. I'm n... NaN \n",
1328
+ "\n",
1329
+ " Unnamed: 3 Unnamed: 4 \n",
1330
+ "600 NaN NaN \n",
1331
+ "601 NaN NaN \n",
1332
+ "**************************************************\n",
1333
+ " v1 v2 Unnamed: 2 Unnamed: 3 Unnamed: 4\n",
1334
+ "700 ham How much r Ì_ willing to pay? NaN NaN NaN\n",
1335
+ "701 ham Sorry, I'll call later NaN NaN NaN\n",
1336
+ "**************************************************\n",
1337
+ " v1 v2 Unnamed: 2 \\\n",
1338
+ "800 spam Last Chance! Claim ur å£150 worth of discount ... NaN \n",
1339
+ "801 ham Appt is at &lt;TIME&gt; am. Not my fault u don... NaN \n",
1340
+ "\n",
1341
+ " Unnamed: 3 Unnamed: 4 \n",
1342
+ "800 NaN NaN \n",
1343
+ "801 NaN NaN \n",
1344
+ "**************************************************\n",
1345
+ " v1 v2 Unnamed: 2 \\\n",
1346
+ "900 ham Probably money worries. Things are coming due ... NaN \n",
1347
+ "901 ham How is it possible to teach you. And where. NaN \n",
1348
+ "\n",
1349
+ " Unnamed: 3 Unnamed: 4 \n",
1350
+ "900 NaN NaN \n",
1351
+ "901 NaN NaN \n",
1352
+ "**************************************************\n",
1353
+ " v1 v2 Unnamed: 2 \\\n",
1354
+ "1000 ham No..but heard abt tat.. NaN \n",
1355
+ "1001 spam Please call our customer service representativ... NaN \n",
1356
+ "\n",
1357
+ " Unnamed: 3 Unnamed: 4 \n",
1358
+ "1000 NaN NaN \n",
1359
+ "1001 NaN NaN \n",
1360
+ "**************************************************\n",
1361
+ " v1 v2 Unnamed: 2 \\\n",
1362
+ "1100 ham You busy or can I come by at some point and fi... NaN \n",
1363
+ "1101 ham Yeah go on then, bored and depressed sittin wa... NaN \n",
1364
+ "\n",
1365
+ " Unnamed: 3 Unnamed: 4 \n",
1366
+ "1100 NaN NaN \n",
1367
+ "1101 NaN NaN \n",
1368
+ "**************************************************\n",
1369
+ " v1 v2 Unnamed: 2 Unnamed: 3 \\\n",
1370
+ "1200 ham Otherwise had part time job na-tuition.. NaN NaN \n",
1371
+ "1201 ham I know she called me NaN NaN \n",
1372
+ "\n",
1373
+ " Unnamed: 4 \n",
1374
+ "1200 NaN \n",
1375
+ "1201 NaN \n",
1376
+ "**************************************************\n",
1377
+ " v1 v2 Unnamed: 2 \\\n",
1378
+ "1300 ham Those cocksuckers. If it makes you feel better... NaN \n",
1379
+ "1301 ham I tot u reach liao. He said t-shirt. NaN \n",
1380
+ "\n",
1381
+ " Unnamed: 3 Unnamed: 4 \n",
1382
+ "1300 NaN NaN \n",
1383
+ "1301 NaN NaN \n",
1384
+ "**************************************************\n",
1385
+ " v1 v2 Unnamed: 2 \\\n",
1386
+ "1400 ham No, I decided that only people who care about ... NaN \n",
1387
+ "1401 ham Kaiez... Enjoy ur tuition... Gee... Thk e seco... NaN \n",
1388
+ "\n",
1389
+ " Unnamed: 3 Unnamed: 4 \n",
1390
+ "1400 NaN NaN \n",
1391
+ "1401 NaN NaN \n",
1392
+ "**************************************************\n",
1393
+ " v1 v2 Unnamed: 2 \\\n",
1394
+ "1500 ham Host-based IDPS for linux systems. NaN \n",
1395
+ "1501 spam HOT LIVE FANTASIES call now 08707509020 Just 2... NaN \n",
1396
+ "\n",
1397
+ " Unnamed: 3 Unnamed: 4 \n",
1398
+ "1500 NaN NaN \n",
1399
+ "1501 NaN NaN \n",
1400
+ "**************************************************\n",
1401
+ " v1 v2 Unnamed: 2 \\\n",
1402
+ "1600 ham K.then any other special? NaN \n",
1403
+ "1601 ham Carlos is taking his sweet time as usual so le... NaN \n",
1404
+ "\n",
1405
+ " Unnamed: 3 Unnamed: 4 \n",
1406
+ "1600 NaN NaN \n",
1407
+ "1601 NaN NaN \n",
1408
+ "**************************************************\n",
1409
+ " v1 v2 Unnamed: 2 \\\n",
1410
+ "1700 ham Please ask mummy to call father NaN \n",
1411
+ "1701 ham Can come my room but cannot come my house cos ... NaN \n",
1412
+ "\n",
1413
+ " Unnamed: 3 Unnamed: 4 \n",
1414
+ "1700 NaN NaN \n",
1415
+ "1701 NaN NaN \n",
1416
+ "**************************************************\n",
1417
+ " v1 v2 Unnamed: 2 \\\n",
1418
+ "1800 ham excellent. I spent &lt;#&gt; years in the Ai... NaN \n",
1419
+ "1801 ham I wanna watch that movie NaN \n",
1420
+ "\n",
1421
+ " Unnamed: 3 Unnamed: 4 \n",
1422
+ "1800 NaN NaN \n",
1423
+ "1801 NaN NaN \n",
1424
+ "**************************************************\n",
1425
+ " v1 v2 Unnamed: 2 \\\n",
1426
+ "1900 ham And miss vday the parachute and double coins??... NaN \n",
1427
+ "1901 ham Sorry, I'll call later NaN \n",
1428
+ "\n",
1429
+ " Unnamed: 3 Unnamed: 4 \n",
1430
+ "1900 NaN NaN \n",
1431
+ "1901 NaN NaN \n",
1432
+ "**************************************************\n",
1433
+ " v1 v2 Unnamed: 2 \\\n",
1434
+ "2000 ham But i'll b going 2 sch on mon. My sis need 2 t... NaN \n",
1435
+ "2001 ham Idea will soon get converted to live:) NaN \n",
1436
+ "\n",
1437
+ " Unnamed: 3 Unnamed: 4 \n",
1438
+ "2000 NaN NaN \n",
1439
+ "2001 NaN NaN \n",
1440
+ "**************************************************\n",
1441
+ " v1 v2 Unnamed: 2 \\\n",
1442
+ "2100 ham Oh Howda gud gud.. Mathe en samachara chikku:-) NaN \n",
1443
+ "2101 ham I thk 530 lor. But dunno can get tickets a not... NaN \n",
1444
+ "\n",
1445
+ " Unnamed: 3 Unnamed: 4 \n",
1446
+ "2100 NaN NaN \n",
1447
+ "2101 NaN NaN \n",
1448
+ "**************************************************\n",
1449
+ " v1 v2 Unnamed: 2 \\\n",
1450
+ "2200 ham Haha... can... But i'm having dinner with my c... NaN \n",
1451
+ "2201 ham A boy was late 2 home. His father: \\POWER OF F... NaN \n",
1452
+ "\n",
1453
+ " Unnamed: 3 Unnamed: 4 \n",
1454
+ "2200 NaN NaN \n",
1455
+ "2201 NaN NaN \n",
1456
+ "**************************************************\n",
1457
+ " v1 v2 Unnamed: 2 \\\n",
1458
+ "2300 ham Nothin comes to my mind. ÌÏ help me buy hanger... NaN \n",
1459
+ "2301 ham &lt;#&gt; , that's all? Guess that's easy enough NaN \n",
1460
+ "\n",
1461
+ " Unnamed: 3 Unnamed: 4 \n",
1462
+ "2300 NaN NaN \n",
1463
+ "2301 NaN NaN \n",
1464
+ "**************************************************\n",
1465
+ " v1 v2 Unnamed: 2 \\\n",
1466
+ "2400 ham Hi! This is Roger from CL. How are you? NaN \n",
1467
+ "2401 spam Babe: U want me dont u baby! Im nasty and have... NaN \n",
1468
+ "\n",
1469
+ " Unnamed: 3 Unnamed: 4 \n",
1470
+ "2400 NaN NaN \n",
1471
+ "2401 NaN NaN \n",
1472
+ "**************************************************\n",
1473
+ " v1 v2 Unnamed: 2 Unnamed: 3 \\\n",
1474
+ "2500 ham Remember to ask alex about his pizza NaN NaN \n",
1475
+ "2501 ham No da..today also i forgot.. NaN NaN \n",
1476
+ "\n",
1477
+ " Unnamed: 4 \n",
1478
+ "2500 NaN \n",
1479
+ "2501 NaN \n",
1480
+ "**************************************************\n",
1481
+ " v1 v2 Unnamed: 2 \\\n",
1482
+ "2600 ham As usual..iam fine, happy &amp; doing well..:) NaN \n",
1483
+ "2601 ham Okie NaN \n",
1484
+ "\n",
1485
+ " Unnamed: 3 Unnamed: 4 \n",
1486
+ "2600 NaN NaN \n",
1487
+ "2601 NaN NaN \n",
1488
+ "**************************************************\n",
1489
+ " v1 v2 Unnamed: 2 \\\n",
1490
+ "2700 ham Feb &lt;#&gt; is \\I LOVE U\\\" day. Send dis t... NaN \n",
1491
+ "2701 ham Hiya, sorry didn't hav signal. I haven't seen ... NaN \n",
1492
+ "\n",
1493
+ " Unnamed: 3 Unnamed: 4 \n",
1494
+ "2700 NaN NaN \n",
1495
+ "2701 NaN NaN \n",
1496
+ "**************************************************\n",
1497
+ " v1 v2 Unnamed: 2 \\\n",
1498
+ "2800 ham Depends on where u going lor. NaN \n",
1499
+ "2801 ham And smile for me right now as you go and the w... NaN \n",
1500
+ "\n",
1501
+ " Unnamed: 3 Unnamed: 4 \n",
1502
+ "2800 NaN NaN \n",
1503
+ "2801 NaN NaN \n",
1504
+ "**************************************************\n",
1505
+ " v1 v2 Unnamed: 2 \\\n",
1506
+ "2900 spam Ur cash-balance is currently 500 pounds - to m... NaN \n",
1507
+ "2901 ham Bill, as in: Are there any letters for me. i‰Û... NaN \n",
1508
+ "\n",
1509
+ " Unnamed: 3 Unnamed: 4 \n",
1510
+ "2900 NaN NaN \n",
1511
+ "2901 NaN NaN \n",
1512
+ "**************************************************\n",
1513
+ " v1 v2 Unnamed: 2 \\\n",
1514
+ "3000 spam This message is free. Welcome to the new & imp... NaN \n",
1515
+ "3001 ham Excellent, I'll see what riley's plans are NaN \n",
1516
+ "\n",
1517
+ " Unnamed: 3 Unnamed: 4 \n",
1518
+ "3000 NaN NaN \n",
1519
+ "3001 NaN NaN \n",
1520
+ "**************************************************\n",
1521
+ " v1 v2 Unnamed: 2 \\\n",
1522
+ "3100 ham Pathaya enketa maraikara pa' NaN \n",
1523
+ "3101 ham Even if he my friend he is a priest call him now NaN \n",
1524
+ "\n",
1525
+ " Unnamed: 3 Unnamed: 4 \n",
1526
+ "3100 NaN NaN \n",
1527
+ "3101 NaN NaN \n",
1528
+ "**************************************************\n",
1529
+ " v1 v2 Unnamed: 2 \\\n",
1530
+ "3200 ham Nice.nice.how is it working? NaN \n",
1531
+ "3201 ham Okay lor... Wah... like that def they wont let... NaN \n",
1532
+ "\n",
1533
+ " Unnamed: 3 Unnamed: 4 \n",
1534
+ "3200 NaN NaN \n",
1535
+ "3201 NaN NaN \n",
1536
+ "**************************************************\n",
1537
+ " v1 v2 Unnamed: 2 \\\n",
1538
+ "3300 spam RCT' THNQ Adrian for U text. Rgds Vatian NaN \n",
1539
+ "3301 ham Stop calling everyone saying I might have canc... NaN \n",
1540
+ "\n",
1541
+ " Unnamed: 3 Unnamed: 4 \n",
1542
+ "3300 NaN NaN \n",
1543
+ "3301 NaN NaN \n",
1544
+ "**************************************************\n",
1545
+ " v1 v2 Unnamed: 2 \\\n",
1546
+ "3400 ham Thanks honey. Have a great day. NaN \n",
1547
+ "3401 ham 'An Amazing Quote'' - \\Sometimes in life its d... NaN \n",
1548
+ "\n",
1549
+ " Unnamed: 3 Unnamed: 4 \n",
1550
+ "3400 NaN NaN \n",
1551
+ "3401 NaN NaN \n",
1552
+ "**************************************************\n",
1553
+ " v1 v2 Unnamed: 2 \\\n",
1554
+ "3500 ham says the &lt;#&gt; year old with a man and m... NaN \n",
1555
+ "3501 ham I will come to ur home now NaN \n",
1556
+ "\n",
1557
+ " Unnamed: 3 Unnamed: 4 \n",
1558
+ "3500 NaN NaN \n",
1559
+ "3501 NaN NaN \n",
1560
+ "**************************************************\n",
1561
+ " v1 v2 Unnamed: 2 \\\n",
1562
+ "3600 ham Jay told me already, will do NaN \n",
1563
+ "3601 ham Cps is causing the outages to conserve energy. NaN \n",
1564
+ "\n",
1565
+ " Unnamed: 3 Unnamed: 4 \n",
1566
+ "3600 NaN NaN \n",
1567
+ "3601 NaN NaN \n",
1568
+ "**************************************************\n",
1569
+ " v1 v2 Unnamed: 2 \\\n",
1570
+ "3700 ham Shall i get my pouch? NaN \n",
1571
+ "3701 ham Hey loverboy! I love you !! I had to tell ... ... NaN \n",
1572
+ "\n",
1573
+ " Unnamed: 3 Unnamed: 4 \n",
1574
+ "3700 NaN NaN \n",
1575
+ "3701 NaN NaN \n",
1576
+ "**************************************************\n",
1577
+ " v1 v2 Unnamed: 2 Unnamed: 3 \\\n",
1578
+ "3800 ham It's ok, at least armand's still around NaN NaN \n",
1579
+ "3801 ham No da. I am happy that we sit together na NaN NaN \n",
1580
+ "\n",
1581
+ " Unnamed: 4 \n",
1582
+ "3800 NaN \n",
1583
+ "3801 NaN \n",
1584
+ "**************************************************\n",
1585
+ " v1 v2 Unnamed: 2 \\\n",
1586
+ "3900 ham That depends. How would you like to be treated... NaN \n",
1587
+ "3901 ham Right on brah, see you later NaN \n",
1588
+ "\n",
1589
+ " Unnamed: 3 Unnamed: 4 \n",
1590
+ "3900 NaN NaN \n",
1591
+ "3901 NaN NaN \n",
1592
+ "**************************************************\n",
1593
+ " v1 v2 Unnamed: 2 \\\n",
1594
+ "4000 ham He's just gonna worry for nothing. And he won'... NaN \n",
1595
+ "4001 ham Did you get any gift? This year i didnt get an... NaN \n",
1596
+ "\n",
1597
+ " Unnamed: 3 Unnamed: 4 \n",
1598
+ "4000 NaN NaN \n",
1599
+ "4001 NaN NaN \n",
1600
+ "**************************************************\n",
1601
+ " v1 v2 Unnamed: 2 \\\n",
1602
+ "4100 spam GSOH? Good with SPAM the ladies?U could b a ma... NaN \n",
1603
+ "4101 ham Ok then i will come to ur home after half an hour NaN \n",
1604
+ "\n",
1605
+ " Unnamed: 3 Unnamed: 4 \n",
1606
+ "4100 NaN NaN \n",
1607
+ "4101 NaN NaN \n",
1608
+ "**************************************************\n",
1609
+ " v1 v2 Unnamed: 2 \\\n",
1610
+ "4200 ham Wylie update: my weed dealer carlos went to fr... NaN \n",
1611
+ "4201 ham Are you happy baby ? Are you alright ? Did you... NaN \n",
1612
+ "\n",
1613
+ " Unnamed: 3 Unnamed: 4 \n",
1614
+ "4200 NaN NaN \n",
1615
+ "4201 NaN NaN \n",
1616
+ "**************************************************\n",
1617
+ " v1 v2 Unnamed: 2 \\\n",
1618
+ "4300 ham Are there TA jobs available? Let me know pleas... NaN \n",
1619
+ "4301 ham Aiyar hard 2 type. U later free then tell me t... NaN \n",
1620
+ "\n",
1621
+ " Unnamed: 3 Unnamed: 4 \n",
1622
+ "4300 NaN NaN \n",
1623
+ "4301 NaN NaN \n",
1624
+ "**************************************************\n",
1625
+ " v1 v2 Unnamed: 2 \\\n",
1626
+ "4400 ham Many times we lose our best ones bcoz we are NaN \n",
1627
+ "4401 ham Good FRIENDS CaRE for each Other.. CLoSE Frien... NaN \n",
1628
+ "\n",
1629
+ " Unnamed: 3 Unnamed: 4 \n",
1630
+ "4400 NaN NaN \n",
1631
+ "4401 NaN NaN \n",
1632
+ "**************************************************\n",
1633
+ " v1 v2 Unnamed: 2 Unnamed: 3 Unnamed: 4\n",
1634
+ "4500 ham So wat's da decision? NaN NaN NaN\n",
1635
+ "4501 ham Wot is u up 2 then bitch? NaN NaN NaN\n",
1636
+ "**************************************************\n",
1637
+ " v1 v2 \\\n",
1638
+ "4600 spam FreeMsg: Txt: CALL to No: 86888 & claim your r... \n",
1639
+ "4601 ham \\Hey j! r u feeling any better \n",
1640
+ "\n",
1641
+ " Unnamed: 2 Unnamed: 3 Unnamed: 4 \n",
1642
+ "4600 NaN NaN NaN \n",
1643
+ "4601 hopeSo hunny. i amnow feelin ill & ithink i m... NaN NaN \n",
1644
+ "**************************************************\n",
1645
+ " v1 v2 Unnamed: 2 Unnamed: 3 Unnamed: 4\n",
1646
+ "4700 ham I liked the new mobile NaN NaN NaN\n",
1647
+ "4701 ham Anytime... NaN NaN NaN\n",
1648
+ "**************************************************\n",
1649
+ " v1 v2 Unnamed: 2 \\\n",
1650
+ "4800 ham The guy at the car shop who was flirting with ... NaN \n",
1651
+ "4801 ham Reverse is cheating. That is not mathematics. NaN \n",
1652
+ "\n",
1653
+ " Unnamed: 3 Unnamed: 4 \n",
1654
+ "4800 NaN NaN \n",
1655
+ "4801 NaN NaN \n",
1656
+ "**************************************************\n",
1657
+ " v1 v2 Unnamed: 2 \\\n",
1658
+ "4900 ham Taka lor. Wat time u wan 2 come n look 4 us? NaN \n",
1659
+ "4901 spam * FREE* POLYPHONIC RINGTONE Text SUPER to 8713... NaN \n",
1660
+ "\n",
1661
+ " Unnamed: 3 Unnamed: 4 \n",
1662
+ "4900 NaN NaN \n",
1663
+ "4901 NaN NaN \n",
1664
+ "**************************************************\n",
1665
+ " v1 v2 Unnamed: 2 \\\n",
1666
+ "5000 ham Nope. Since ayo travelled, he has forgotten hi... NaN \n",
1667
+ "5001 ham You still around? Looking to pick up later NaN \n",
1668
+ "\n",
1669
+ " Unnamed: 3 Unnamed: 4 \n",
1670
+ "5000 NaN NaN \n",
1671
+ "5001 NaN NaN \n",
1672
+ "**************************************************\n",
1673
+ " v1 v2 Unnamed: 2 Unnamed: 3 \\\n",
1674
+ "5100 ham Aight, call me once you're close NaN NaN \n",
1675
+ "5101 ham Nope thats fine. I might have a nap tho! NaN NaN \n",
1676
+ "\n",
1677
+ " Unnamed: 4 \n",
1678
+ "5100 NaN \n",
1679
+ "5101 NaN \n",
1680
+ "**************************************************\n",
1681
+ " v1 v2 Unnamed: 2 \\\n",
1682
+ "5200 spam Call Germany for only 1 pence per minute! Call... NaN \n",
1683
+ "5201 spam YOU VE WON! Your 4* Costa Del Sol Holiday or å... NaN \n",
1684
+ "\n",
1685
+ " Unnamed: 3 Unnamed: 4 \n",
1686
+ "5200 NaN NaN \n",
1687
+ "5201 NaN NaN \n",
1688
+ "**************************************************\n",
1689
+ " v1 v2 Unnamed: 2 Unnamed: 3 \\\n",
1690
+ "5300 ham I can't make it tonight NaN NaN \n",
1691
+ "5301 ham At WHAT TIME should i come tomorrow NaN NaN \n",
1692
+ "\n",
1693
+ " Unnamed: 4 \n",
1694
+ "5300 NaN \n",
1695
+ "5301 NaN \n",
1696
+ "**************************************************\n",
1697
+ " v1 v2 Unnamed: 2 \\\n",
1698
+ "5400 ham HARD BUT TRUE: How much you show &amp; expres... NaN \n",
1699
+ "5401 ham Babes I think I got ur brolly I left it in Eng... NaN \n",
1700
+ "\n",
1701
+ " Unnamed: 3 Unnamed: 4 \n",
1702
+ "5400 NaN NaN \n",
1703
+ "5401 NaN NaN \n",
1704
+ "**************************************************\n",
1705
+ " v1 v2 Unnamed: 2 \\\n",
1706
+ "5500 ham Love has one law; Make happy the person you lo... NaN \n",
1707
+ "5501 spam PRIVATE! Your 2003 Account Statement for 07808... NaN \n",
1708
+ "\n",
1709
+ " Unnamed: 3 Unnamed: 4 \n",
1710
+ "5500 NaN NaN \n",
1711
+ "5501 NaN NaN \n",
1712
+ "**************************************************\n"
1713
+ ]
1714
+ }
1715
+ ],
1716
+ "source": [
1717
+ "files = pd.read_csv(\"spam.csv\",encoding = \"latin\",chunksize = 100)\n",
1718
+ "c = 0\n",
1719
+ "for chunk in files:\n",
1720
+ " print(chunk.head(2))\n",
1721
+ " print(\"*\"*50)\n",
1722
+ " c+=1"
1723
+ ]
1724
+ },
1725
+ {
1726
+ "cell_type": "code",
1727
+ "execution_count": 28,
1728
+ "id": "85df16cb",
1729
+ "metadata": {},
1730
+ "outputs": [
1731
+ {
1732
+ "data": {
1733
+ "text/plain": [
1734
+ "56"
1735
+ ]
1736
+ },
1737
+ "execution_count": 28,
1738
+ "metadata": {},
1739
+ "output_type": "execute_result"
1740
+ }
1741
+ ],
1742
+ "source": [
1743
+ "c"
1744
+ ]
1745
+ },
1746
+ {
1747
+ "cell_type": "code",
1748
+ "execution_count": 30,
1749
+ "id": "f00ee49c",
1750
+ "metadata": {},
1751
+ "outputs": [],
1752
+ "source": [
1753
+ "import time "
1754
+ ]
1755
+ },
1756
+ {
1757
+ "cell_type": "code",
1758
+ "execution_count": 32,
1759
+ "id": "a2d7f7ab",
1760
+ "metadata": {},
1761
+ "outputs": [],
1762
+ "source": [
1763
+ "x = time.time()\n",
1764
+ "data1 = pd.read_csv(\"spam.csv\",encoding = \"latin\")\n",
1765
+ "y = time.time()"
1766
+ ]
1767
+ },
1768
+ {
1769
+ "cell_type": "code",
1770
+ "execution_count": 34,
1771
+ "id": "31300d60",
1772
+ "metadata": {},
1773
+ "outputs": [
1774
+ {
1775
+ "data": {
1776
+ "text/plain": [
1777
+ "0.021105051040649414"
1778
+ ]
1779
+ },
1780
+ "execution_count": 34,
1781
+ "metadata": {},
1782
+ "output_type": "execute_result"
1783
+ }
1784
+ ],
1785
+ "source": [
1786
+ "y-x"
1787
+ ]
1788
+ },
1789
+ {
1790
+ "cell_type": "code",
1791
+ "execution_count": 36,
1792
+ "id": "ef33bccf",
1793
+ "metadata": {},
1794
+ "outputs": [
1795
+ {
1796
+ "name": "stdout",
1797
+ "output_type": "stream",
1798
+ "text": [
1799
+ "Collecting polars\n",
1800
+ " Downloading polars-1.17.1-cp39-abi3-win_amd64.whl.metadata (15 kB)\n",
1801
+ "Downloading polars-1.17.1-cp39-abi3-win_amd64.whl (35.9 MB)\n",
1802
+ " ---------------------------------------- 0.0/35.9 MB ? eta -:--:--\n",
1803
+ " ---------------------------------------- 0.0/35.9 MB ? eta -:--:--\n",
1804
+ " ---------------------------------------- 0.0/35.9 MB ? eta -:--:--\n",
1805
+ " ---------------------------------------- 0.0/35.9 MB ? eta -:--:--\n",
1806
+ " ---------------------------------------- 0.0/35.9 MB ? eta -:--:--\n",
1807
+ " ---------------------------------------- 0.0/35.9 MB ? eta -:--:--\n",
1808
+ " ---------------------------------------- 0.4/35.9 MB 2.5 MB/s eta 0:00:15\n",
1809
+ " - -------------------------------------- 1.3/35.9 MB 6.9 MB/s eta 0:00:06\n",
1810
+ " -- ------------------------------------- 2.1/35.9 MB 8.9 MB/s eta 0:00:04\n",
1811
+ " --- ------------------------------------ 3.1/35.9 MB 10.4 MB/s eta 0:00:04\n",
1812
+ " ---- ----------------------------------- 4.3/35.9 MB 12.6 MB/s eta 0:00:03\n",
1813
+ " ------ --------------------------------- 5.4/35.9 MB 14.4 MB/s eta 0:00:03\n",
1814
+ " ------- -------------------------------- 6.8/35.9 MB 15.4 MB/s eta 0:00:02\n",
1815
+ " --------- ------------------------------ 8.1/35.9 MB 17.3 MB/s eta 0:00:02\n",
1816
+ " ---------- ----------------------------- 9.5/35.9 MB 18.5 MB/s eta 0:00:02\n",
1817
+ " ------------ --------------------------- 11.1/35.9 MB 25.2 MB/s eta 0:00:01\n",
1818
+ " ------------- -------------------------- 12.6/35.9 MB 28.4 MB/s eta 0:00:01\n",
1819
+ " --------------- ------------------------ 13.9/35.9 MB 28.5 MB/s eta 0:00:01\n",
1820
+ " ----------------- ---------------------- 15.5/35.9 MB 29.7 MB/s eta 0:00:01\n",
1821
+ " ------------------ --------------------- 16.9/35.9 MB 31.2 MB/s eta 0:00:01\n",
1822
+ " -------------------- ------------------- 18.4/35.9 MB 31.2 MB/s eta 0:00:01\n",
1823
+ " ---------------------- ----------------- 19.8/35.9 MB 31.1 MB/s eta 0:00:01\n",
1824
+ " ----------------------- ---------------- 21.2/35.9 MB 29.8 MB/s eta 0:00:01\n",
1825
+ " ------------------------- -------------- 22.8/35.9 MB 31.2 MB/s eta 0:00:01\n",
1826
+ " -------------------------- ------------- 24.2/35.9 MB 31.2 MB/s eta 0:00:01\n",
1827
+ " ---------------------------- ----------- 25.5/35.9 MB 29.7 MB/s eta 0:00:01\n",
1828
+ " ------------------------------ --------- 27.1/35.9 MB 31.2 MB/s eta 0:00:01\n",
1829
+ " ------------------------------- -------- 28.4/35.9 MB 29.7 MB/s eta 0:00:01\n",
1830
+ " --------------------------------- ------ 29.9/35.9 MB 29.7 MB/s eta 0:00:01\n",
1831
+ " ---------------------------------- ----- 31.3/35.9 MB 31.1 MB/s eta 0:00:01\n",
1832
+ " ------------------------------------ --- 32.8/35.9 MB 29.8 MB/s eta 0:00:01\n",
1833
+ " ------------------------------------- -- 33.7/35.9 MB 27.3 MB/s eta 0:00:01\n",
1834
+ " -------------------------------------- - 35.0/35.9 MB 28.5 MB/s eta 0:00:01\n",
1835
+ " --------------------------------------- 35.9/35.9 MB 28.5 MB/s eta 0:00:01\n",
1836
+ " --------------------------------------- 35.9/35.9 MB 28.5 MB/s eta 0:00:01\n",
1837
+ " ---------------------------------------- 35.9/35.9 MB 23.4 MB/s eta 0:00:00\n",
1838
+ "Installing collected packages: polars\n",
1839
+ "Successfully installed polars-1.17.1\n",
1840
+ "Note: you may need to restart the kernel to use updated packages.\n"
1841
+ ]
1842
+ }
1843
+ ],
1844
+ "source": [
1845
+ "pip install polars"
1846
+ ]
1847
+ },
1848
+ {
1849
+ "cell_type": "code",
1850
+ "execution_count": 37,
1851
+ "id": "8398770d",
1852
+ "metadata": {},
1853
+ "outputs": [],
1854
+ "source": [
1855
+ "import polars"
1856
+ ]
1857
+ },
1858
+ {
1859
+ "cell_type": "code",
1860
+ "execution_count": 38,
1861
+ "id": "423c69d5",
1862
+ "metadata": {},
1863
+ "outputs": [],
1864
+ "source": [
1865
+ "x = time.time()\n",
1866
+ "data2 = polars.read_csv(\"spam.csv\",encoding = \"latin\")\n",
1867
+ "y = time.time()"
1868
+ ]
1869
+ },
1870
+ {
1871
+ "cell_type": "code",
1872
+ "execution_count": 39,
1873
+ "id": "8ea55f6f",
1874
+ "metadata": {},
1875
+ "outputs": [
1876
+ {
1877
+ "data": {
1878
+ "text/plain": [
1879
+ "0.5820145606994629"
1880
+ ]
1881
+ },
1882
+ "execution_count": 39,
1883
+ "metadata": {},
1884
+ "output_type": "execute_result"
1885
+ }
1886
+ ],
1887
+ "source": [
1888
+ "y-x"
1889
+ ]
1890
+ },
1891
+ {
1892
+ "cell_type": "code",
1893
+ "execution_count": null,
1894
+ "id": "50ba48b0",
1895
+ "metadata": {},
1896
+ "outputs": [],
1897
+ "source": []
1898
+ },
1899
+ {
1900
+ "cell_type": "code",
1901
+ "execution_count": null,
1902
+ "id": "1d6fd6e1",
1903
+ "metadata": {},
1904
+ "outputs": [],
1905
+ "source": []
1906
+ }
1907
+ ],
1908
+ "metadata": {
1909
+ "kernelspec": {
1910
+ "display_name": "Python 3 (ipykernel)",
1911
+ "language": "python",
1912
+ "name": "python3"
1913
+ },
1914
+ "language_info": {
1915
+ "codemirror_mode": {
1916
+ "name": "ipython",
1917
+ "version": 3
1918
+ },
1919
+ "file_extension": ".py",
1920
+ "mimetype": "text/x-python",
1921
+ "name": "python",
1922
+ "nbconvert_exporter": "python",
1923
+ "pygments_lexer": "ipython3",
1924
+ "version": "3.11.7"
1925
+ }
1926
+ },
1927
+ "nbformat": 4,
1928
+ "nbformat_minor": 5
1929
+ }