\n",
94 | "matplotlib: 3.0.2\n",
95 | "pandas: 0.23.4\n",
96 | "plotly: 3.10.0\n"
97 | ]
98 | }
99 | ],
100 | "source": [
101 | "# Python version\n",
102 | "import sys\n",
103 | "print('Python: {}'.format(sys.version))\n",
104 | "# numpy\n",
105 | "import numpy\n",
106 | "print('numpy: {}'.format(numpy.version))\n",
107 | "# matplotlib\n",
108 | "import matplotlib\n",
109 | "print('matplotlib: {}'.format(matplotlib.__version__))\n",
110 | "# pandas\n",
111 | "import pandas\n",
112 | "print('pandas: {}'.format(pandas.__version__))\n",
113 | "# Data visualizaion\n",
114 | "import plotly\n",
115 | "import plotly_express as px\n",
116 | "print(\"plotly:\",plotly.__version__)\n"
117 | ]
118 | },
119 | {
120 | "cell_type": "code",
121 | "execution_count": null,
122 | "metadata": {},
123 | "outputs": [],
124 | "source": []
125 | },
126 | {
127 | "cell_type": "markdown",
128 | "metadata": {},
129 | "source": [
130 | "#### Arthmatic operation:\n"
131 | ]
132 | },
133 | {
134 | "cell_type": "code",
135 | "execution_count": 184,
136 | "metadata": {},
137 | "outputs": [
138 | {
139 | "data": {
140 | "text/plain": [
141 | "235"
142 | ]
143 | },
144 | "execution_count": 184,
145 | "metadata": {},
146 | "output_type": "execute_result"
147 | }
148 | ],
149 | "source": [
150 | "12+223"
151 | ]
152 | },
153 | {
154 | "cell_type": "code",
155 | "execution_count": 185,
156 | "metadata": {},
157 | "outputs": [
158 | {
159 | "data": {
160 | "text/plain": [
161 | "11"
162 | ]
163 | },
164 | "execution_count": 185,
165 | "metadata": {},
166 | "output_type": "execute_result"
167 | }
168 | ],
169 | "source": [
170 | "34-23"
171 | ]
172 | },
173 | {
174 | "cell_type": "code",
175 | "execution_count": 186,
176 | "metadata": {},
177 | "outputs": [
178 | {
179 | "data": {
180 | "text/plain": [
181 | "108"
182 | ]
183 | },
184 | "execution_count": 186,
185 | "metadata": {},
186 | "output_type": "execute_result"
187 | }
188 | ],
189 | "source": [
190 | "54*2"
191 | ]
192 | },
193 | {
194 | "cell_type": "code",
195 | "execution_count": 187,
196 | "metadata": {},
197 | "outputs": [
198 | {
199 | "data": {
200 | "text/plain": [
201 | "21.0"
202 | ]
203 | },
204 | "execution_count": 187,
205 | "metadata": {},
206 | "output_type": "execute_result"
207 | }
208 | ],
209 | "source": [
210 | "42/2"
211 | ]
212 | },
213 | {
214 | "cell_type": "code",
215 | "execution_count": 188,
216 | "metadata": {},
217 | "outputs": [
218 | {
219 | "data": {
220 | "text/plain": [
221 | "1728"
222 | ]
223 | },
224 | "execution_count": 188,
225 | "metadata": {},
226 | "output_type": "execute_result"
227 | }
228 | ],
229 | "source": [
230 | "12**3"
231 | ]
232 | },
233 | {
234 | "cell_type": "code",
235 | "execution_count": 189,
236 | "metadata": {},
237 | "outputs": [
238 | {
239 | "data": {
240 | "text/plain": [
241 | "3"
242 | ]
243 | },
244 | "execution_count": 189,
245 | "metadata": {},
246 | "output_type": "execute_result"
247 | }
248 | ],
249 | "source": [
250 | "45%6"
251 | ]
252 | },
253 | {
254 | "cell_type": "code",
255 | "execution_count": 190,
256 | "metadata": {},
257 | "outputs": [
258 | {
259 | "data": {
260 | "text/plain": [
261 | "97.0"
262 | ]
263 | },
264 | "execution_count": 190,
265 | "metadata": {},
266 | "output_type": "execute_result"
267 | }
268 | ],
269 | "source": [
270 | "23+43*4/2-12"
271 | ]
272 | },
273 | {
274 | "cell_type": "markdown",
275 | "metadata": {},
276 | "source": [
277 | "Assignment "
278 | ]
279 | },
280 | {
281 | "cell_type": "code",
282 | "execution_count": 191,
283 | "metadata": {
284 | "scrolled": true
285 | },
286 | "outputs": [
287 | {
288 | "data": {
289 | "text/plain": [
290 | "3"
291 | ]
292 | },
293 | "execution_count": 191,
294 | "metadata": {},
295 | "output_type": "execute_result"
296 | }
297 | ],
298 | "source": [
299 | "c=15\n",
300 | "d=4\n",
301 | "c%d"
302 | ]
303 | },
304 | {
305 | "cell_type": "markdown",
306 | "metadata": {},
307 | "source": [
308 | "## Data type"
309 | ]
310 | },
311 | {
312 | "cell_type": "code",
313 | "execution_count": 192,
314 | "metadata": {
315 | "scrolled": true
316 | },
317 | "outputs": [
318 | {
319 | "name": "stdout",
320 | "output_type": "stream",
321 | "text": [
322 | "Indian Premier League\n",
323 | "24\n"
324 | ]
325 | }
326 | ],
327 | "source": [
328 | " #str \"abc\"\n",
329 | "12 #int\n",
330 | "2.4 #float\n",
331 | "#Numbers likes foats, integers\n",
332 | "#Boolean values like True, False\n",
333 | "title= 'Indian Premier League'\n",
334 | "print(title)\n",
335 | "title=12\n",
336 | "print(title*2)\n"
337 | ]
338 | },
339 | {
340 | "cell_type": "code",
341 | "execution_count": 193,
342 | "metadata": {},
343 | "outputs": [
344 | {
345 | "name": "stdout",
346 | "output_type": "stream",
347 | "text": [
348 | "46\n",
349 | "-22\n",
350 | "408\n",
351 | "4922235242952026704037113243122008064\n",
352 | "0.35294117647058826\n",
353 | "12\n"
354 | ]
355 | }
356 | ],
357 | "source": [
358 | "a=12\n",
359 | "b=34\n",
360 | "print(a+b)\n",
361 | "print(a-b)\n",
362 | "print(a*b)\n",
363 | "print(a**b)\n",
364 | "print(a/b)\n",
365 | "print(a%b)"
366 | ]
367 | },
368 | {
369 | "cell_type": "code",
370 | "execution_count": null,
371 | "metadata": {},
372 | "outputs": [],
373 | "source": []
374 | },
375 | {
376 | "cell_type": "code",
377 | "execution_count": 194,
378 | "metadata": {},
379 | "outputs": [
380 | {
381 | "data": {
382 | "text/plain": [
383 | "16"
384 | ]
385 | },
386 | "execution_count": 194,
387 | "metadata": {},
388 | "output_type": "execute_result"
389 | }
390 | ],
391 | "source": [
392 | "name= 2**4\n",
393 | "name"
394 | ]
395 | },
396 | {
397 | "cell_type": "markdown",
398 | "metadata": {},
399 | "source": [
400 | "## String operation"
401 | ]
402 | },
403 | {
404 | "cell_type": "markdown",
405 | "metadata": {},
406 | "source": [
407 | "string addition "
408 | ]
409 | },
410 | {
411 | "cell_type": "code",
412 | "execution_count": 195,
413 | "metadata": {},
414 | "outputs": [
415 | {
416 | "data": {
417 | "text/plain": [
418 | "'We are Understanding IPL with help of python'"
419 | ]
420 | },
421 | "execution_count": 195,
422 | "metadata": {},
423 | "output_type": "execute_result"
424 | }
425 | ],
426 | "source": [
427 | "a=\"We are \"\n",
428 | "b=\"Understanding IPL \"\n",
429 | "c=\"with help of python\"\n",
430 | "a+b+c"
431 | ]
432 | },
433 | {
434 | "cell_type": "markdown",
435 | "metadata": {},
436 | "source": [
437 | "String multiplication"
438 | ]
439 | },
440 | {
441 | "cell_type": "code",
442 | "execution_count": 196,
443 | "metadata": {
444 | "scrolled": true
445 | },
446 | "outputs": [],
447 | "source": [
448 | "name=' IPL '\n"
449 | ]
450 | },
451 | {
452 | "cell_type": "code",
453 | "execution_count": 197,
454 | "metadata": {
455 | "scrolled": true
456 | },
457 | "outputs": [
458 | {
459 | "data": {
460 | "text/plain": [
461 | "' IPL IPL IPL IPL IPL IPL '"
462 | ]
463 | },
464 | "execution_count": 197,
465 | "metadata": {},
466 | "output_type": "execute_result"
467 | }
468 | ],
469 | "source": [
470 | "name*6"
471 | ]
472 | },
473 | {
474 | "cell_type": "code",
475 | "execution_count": 198,
476 | "metadata": {
477 | "scrolled": true
478 | },
479 | "outputs": [
480 | {
481 | "data": {
482 | "text/plain": [
483 | "True"
484 | ]
485 | },
486 | "execution_count": 198,
487 | "metadata": {},
488 | "output_type": "execute_result"
489 | }
490 | ],
491 | "source": [
492 | "'I' in name"
493 | ]
494 | },
495 | {
496 | "cell_type": "code",
497 | "execution_count": 199,
498 | "metadata": {
499 | "scrolled": true
500 | },
501 | "outputs": [
502 | {
503 | "data": {
504 | "text/plain": [
505 | "False"
506 | ]
507 | },
508 | "execution_count": 199,
509 | "metadata": {},
510 | "output_type": "execute_result"
511 | }
512 | ],
513 | "source": [
514 | "'l' in name"
515 | ]
516 | },
517 | {
518 | "cell_type": "markdown",
519 | "metadata": {},
520 | "source": [
521 | "## List"
522 | ]
523 | },
524 | {
525 | "cell_type": "code",
526 | "execution_count": 200,
527 | "metadata": {},
528 | "outputs": [],
529 | "source": [
530 | "team_ranking = [1, 2, 3, 4, 5, 6, 7, 8]\n",
531 | "team_name = ['MI', 'CSK', 'DC', 'SH', 'KKR','KXIP','RR', 'RCB']\n",
532 | "\n",
533 | "zipped_list = zip(team_ranking, team_name)\n",
534 | "\n",
535 | "#print(list(zipped_list))"
536 | ]
537 | },
538 | {
539 | "cell_type": "code",
540 | "execution_count": 201,
541 | "metadata": {},
542 | "outputs": [],
543 | "source": [
544 | "#print(list(zipped_list))"
545 | ]
546 | },
547 | {
548 | "cell_type": "code",
549 | "execution_count": 202,
550 | "metadata": {},
551 | "outputs": [
552 | {
553 | "name": "stdout",
554 | "output_type": "stream",
555 | "text": [
556 | "(1, 2, 3, 4, 5, 6, 7, 8)\n",
557 | "('MI', 'CSK', 'DC', 'SH', 'KKR', 'KXIP', 'RR', 'RCB')\n"
558 | ]
559 | }
560 | ],
561 | "source": [
562 | "#zipped_list\n",
563 | "list_a, list_b = zip(*zipped_list)\n",
564 | "print(list_a) \n",
565 | "print(list_b)"
566 | ]
567 | },
568 | {
569 | "cell_type": "code",
570 | "execution_count": 203,
571 | "metadata": {
572 | "scrolled": true
573 | },
574 | "outputs": [
575 | {
576 | "data": {
577 | "text/plain": [
578 | "[[4, 5, 6, 7], [3, 4, 5, 6]]"
579 | ]
580 | },
581 | "execution_count": 203,
582 | "metadata": {},
583 | "output_type": "execute_result"
584 | }
585 | ],
586 | "source": [
587 | "a = 'HAVE A'\n",
588 | "b = 'wonderful day'\n",
589 | "my_list = ['my', 'list', a, b]\n",
590 | "my_list3=[1,2,3]\n",
591 | "my_list2 = [[4,5,6,7], [3,4,5,6]]\n",
592 | "my_list2"
593 | ]
594 | },
595 | {
596 | "cell_type": "code",
597 | "execution_count": 204,
598 | "metadata": {},
599 | "outputs": [
600 | {
601 | "data": {
602 | "text/plain": [
603 | "[1, 2, 3]"
604 | ]
605 | },
606 | "execution_count": 204,
607 | "metadata": {},
608 | "output_type": "execute_result"
609 | }
610 | ],
611 | "source": [
612 | "my_list3"
613 | ]
614 | },
615 | {
616 | "cell_type": "code",
617 | "execution_count": 205,
618 | "metadata": {},
619 | "outputs": [
620 | {
621 | "name": "stdout",
622 | "output_type": "stream",
623 | "text": [
624 | "[[4, 5, 6, 7], [3, 4, 5, 6]]\n"
625 | ]
626 | }
627 | ],
628 | "source": [
629 | "print(my_list2)"
630 | ]
631 | },
632 | {
633 | "cell_type": "code",
634 | "execution_count": 206,
635 | "metadata": {
636 | "scrolled": true
637 | },
638 | "outputs": [
639 | {
640 | "name": "stdout",
641 | "output_type": "stream",
642 | "text": [
643 | "list\n",
644 | "list\n"
645 | ]
646 | }
647 | ],
648 | "source": [
649 | "print(my_list[1])\n",
650 | "print(my_list[-3])\n",
651 | "#Slice\n"
652 | ]
653 | },
654 | {
655 | "cell_type": "code",
656 | "execution_count": 207,
657 | "metadata": {
658 | "scrolled": true
659 | },
660 | "outputs": [
661 | {
662 | "name": "stdout",
663 | "output_type": "stream",
664 | "text": [
665 | "['list', 'HAVE A']\n",
666 | "['list', 'HAVE A', 'wonderful day']\n",
667 | "['my', 'list', 'HAVE A']\n",
668 | "['my', 'list', 'HAVE A', 'wonderful day']\n"
669 | ]
670 | }
671 | ],
672 | "source": [
673 | "print(my_list[1:3])\n",
674 | "print(my_list[1:])\n",
675 | "print(my_list[:3])\n",
676 | "print(my_list[:])\n",
677 | "#Subset Lists of Lists\n"
678 | ]
679 | },
680 | {
681 | "cell_type": "code",
682 | "execution_count": 208,
683 | "metadata": {
684 | "scrolled": true
685 | },
686 | "outputs": [
687 | {
688 | "name": "stdout",
689 | "output_type": "stream",
690 | "text": [
691 | "3\n",
692 | "[3, 4]\n"
693 | ]
694 | }
695 | ],
696 | "source": [
697 | "print(my_list2[1][0])\n",
698 | "print(my_list2[1][:2])"
699 | ]
700 | },
701 | {
702 | "cell_type": "code",
703 | "execution_count": 209,
704 | "metadata": {
705 | "scrolled": true
706 | },
707 | "outputs": [
708 | {
709 | "name": "stdout",
710 | "output_type": "stream",
711 | "text": [
712 | "['my', 'list', 'HAVE A', 'wonderful day', 'my', 'list', 'HAVE A', 'wonderful day']\n"
713 | ]
714 | }
715 | ],
716 | "source": [
717 | "new_list=my_list + my_list\n",
718 | "print(new_list)"
719 | ]
720 | },
721 | {
722 | "cell_type": "code",
723 | "execution_count": 210,
724 | "metadata": {
725 | "scrolled": true
726 | },
727 | "outputs": [
728 | {
729 | "data": {
730 | "text/plain": [
731 | "['my',\n",
732 | " 'list',\n",
733 | " 'HAVE A',\n",
734 | " 'wonderful day',\n",
735 | " 'my',\n",
736 | " 'list',\n",
737 | " 'HAVE A',\n",
738 | " 'wonderful day']"
739 | ]
740 | },
741 | "execution_count": 210,
742 | "metadata": {},
743 | "output_type": "execute_result"
744 | }
745 | ],
746 | "source": [
747 | "my_list * 2"
748 | ]
749 | },
750 | {
751 | "cell_type": "code",
752 | "execution_count": 211,
753 | "metadata": {},
754 | "outputs": [
755 | {
756 | "data": {
757 | "text/plain": [
758 | "[1, 2, 3, 4, 5, 6]"
759 | ]
760 | },
761 | "execution_count": 211,
762 | "metadata": {},
763 | "output_type": "execute_result"
764 | }
765 | ],
766 | "source": [
767 | "x = [1, 2, 3]\n",
768 | "x.extend([4, 5, 6])\n",
769 | "x"
770 | ]
771 | },
772 | {
773 | "cell_type": "code",
774 | "execution_count": 212,
775 | "metadata": {
776 | "scrolled": true
777 | },
778 | "outputs": [
779 | {
780 | "data": {
781 | "text/plain": [
782 | "4"
783 | ]
784 | },
785 | "execution_count": 212,
786 | "metadata": {},
787 | "output_type": "execute_result"
788 | }
789 | ],
790 | "source": [
791 | "len(my_list)"
792 | ]
793 | },
794 | {
795 | "cell_type": "code",
796 | "execution_count": 213,
797 | "metadata": {
798 | "scrolled": true
799 | },
800 | "outputs": [
801 | {
802 | "data": {
803 | "text/plain": [
804 | "2"
805 | ]
806 | },
807 | "execution_count": 213,
808 | "metadata": {},
809 | "output_type": "execute_result"
810 | }
811 | ],
812 | "source": [
813 | "len(my_list2)"
814 | ]
815 | },
816 | {
817 | "cell_type": "code",
818 | "execution_count": 214,
819 | "metadata": {
820 | "scrolled": true
821 | },
822 | "outputs": [
823 | {
824 | "name": "stdout",
825 | "output_type": "stream",
826 | "text": [
827 | "['my', 'list', 'HAVE A', 'wonderful day']\n",
828 | "2\n"
829 | ]
830 | }
831 | ],
832 | "source": [
833 | "print(my_list)\n",
834 | "print(my_list.index(a))"
835 | ]
836 | },
837 | {
838 | "cell_type": "code",
839 | "execution_count": 215,
840 | "metadata": {
841 | "scrolled": true
842 | },
843 | "outputs": [
844 | {
845 | "name": "stdout",
846 | "output_type": "stream",
847 | "text": [
848 | "['RR', 'DC', 'CSK', 'CSK', 'KKR', 'MI', 'KKR', 'MI', 'SH', 'MI', 'CSK', 'MI']\n",
849 | "KKR winners for 2\n"
850 | ]
851 | }
852 | ],
853 | "source": [
854 | "ipl_winner_list=[\"RR\",\"DC\",\"CSK\",'CSK','KKR','MI','KKR', 'MI', 'SH', 'MI','CSK', 'MI']\n",
855 | "print(ipl_winner_list)\n",
856 | "print(\"KKR winners for \", ipl_winner_list.count('KKR'))"
857 | ]
858 | },
859 | {
860 | "cell_type": "code",
861 | "execution_count": 216,
862 | "metadata": {
863 | "scrolled": true
864 | },
865 | "outputs": [
866 | {
867 | "name": "stdout",
868 | "output_type": "stream",
869 | "text": [
870 | "['RR', 'DC', 'CSK', 'CSK', 'KKR', 'MI', 'KKR', 'MI', 'SH', 'MI', 'CSK', 'MI', 'BB']\n"
871 | ]
872 | }
873 | ],
874 | "source": [
875 | "ipl_winner_list.append('BB')\n",
876 | "print(ipl_winner_list)"
877 | ]
878 | },
879 | {
880 | "cell_type": "code",
881 | "execution_count": 217,
882 | "metadata": {
883 | "scrolled": true
884 | },
885 | "outputs": [
886 | {
887 | "data": {
888 | "text/plain": [
889 | "['RR', 'DC', 'CSK', 'CSK', 'KKR', 'MI', 'KKR', 'MI', 'SH', 'MI', 'CSK', 'MI']"
890 | ]
891 | },
892 | "metadata": {},
893 | "output_type": "display_data"
894 | }
895 | ],
896 | "source": [
897 | "ipl_winner_list.remove('BB')\n",
898 | "display(ipl_winner_list)"
899 | ]
900 | },
901 | {
902 | "cell_type": "code",
903 | "execution_count": 218,
904 | "metadata": {
905 | "scrolled": true
906 | },
907 | "outputs": [
908 | {
909 | "data": {
910 | "text/plain": [
911 | "['MI', 'CSK', 'MI', 'SH', 'MI', 'KKR', 'MI', 'KKR', 'CSK', 'CSK', 'DC', 'RR']"
912 | ]
913 | },
914 | "execution_count": 218,
915 | "metadata": {},
916 | "output_type": "execute_result"
917 | }
918 | ],
919 | "source": [
920 | "a=ipl_winner_list.reverse()\n",
921 | "a\n",
922 | "ipl_winner_list"
923 | ]
924 | },
925 | {
926 | "cell_type": "code",
927 | "execution_count": 219,
928 | "metadata": {
929 | "scrolled": true
930 | },
931 | "outputs": [
932 | {
933 | "data": {
934 | "text/plain": [
935 | "['MI', 'CSK', 'MI', 'SH', 'MI', 'KKR', 'MI', 'KKR', 'CSK', 'CSK', 'DC']"
936 | ]
937 | },
938 | "execution_count": 219,
939 | "metadata": {},
940 | "output_type": "execute_result"
941 | }
942 | ],
943 | "source": [
944 | "ipl_winner_list.pop()\n",
945 | "ipl_winner_list"
946 | ]
947 | },
948 | {
949 | "cell_type": "code",
950 | "execution_count": 220,
951 | "metadata": {
952 | "scrolled": true
953 | },
954 | "outputs": [
955 | {
956 | "data": {
957 | "text/plain": [
958 | "['CSK', 'CSK', 'CSK', 'DC', 'KKR', 'KKR', 'MI', 'MI', 'MI', 'MI', 'SH']"
959 | ]
960 | },
961 | "execution_count": 220,
962 | "metadata": {},
963 | "output_type": "execute_result"
964 | }
965 | ],
966 | "source": [
967 | "ipl_winner_list.sort()\n",
968 | "ipl_winner_list"
969 | ]
970 | },
971 | {
972 | "cell_type": "code",
973 | "execution_count": 221,
974 | "metadata": {
975 | "scrolled": true
976 | },
977 | "outputs": [
978 | {
979 | "data": {
980 | "text/plain": [
981 | "'won IPL titl'"
982 | ]
983 | },
984 | "execution_count": 221,
985 | "metadata": {},
986 | "output_type": "execute_result"
987 | }
988 | ],
989 | "source": [
990 | "my_string='MI won IPL title 4 times'\n",
991 | "my_string[3:15]\n"
992 | ]
993 | },
994 | {
995 | "cell_type": "code",
996 | "execution_count": 222,
997 | "metadata": {
998 | "scrolled": true
999 | },
1000 | "outputs": [
1001 | {
1002 | "data": {
1003 | "text/plain": [
1004 | "'on IP'"
1005 | ]
1006 | },
1007 | "execution_count": 222,
1008 | "metadata": {},
1009 | "output_type": "execute_result"
1010 | }
1011 | ],
1012 | "source": [
1013 | "my_string[4:9]"
1014 | ]
1015 | },
1016 | {
1017 | "cell_type": "code",
1018 | "execution_count": 223,
1019 | "metadata": {
1020 | "scrolled": true
1021 | },
1022 | "outputs": [
1023 | {
1024 | "data": {
1025 | "text/plain": [
1026 | "'MI WON IPL TITLE 4 TIMES'"
1027 | ]
1028 | },
1029 | "execution_count": 223,
1030 | "metadata": {},
1031 | "output_type": "execute_result"
1032 | }
1033 | ],
1034 | "source": [
1035 | "up=my_string.upper()\n",
1036 | "up"
1037 | ]
1038 | },
1039 | {
1040 | "cell_type": "code",
1041 | "execution_count": 224,
1042 | "metadata": {
1043 | "scrolled": true
1044 | },
1045 | "outputs": [
1046 | {
1047 | "data": {
1048 | "text/plain": [
1049 | "'mi won ipl title 4 times'"
1050 | ]
1051 | },
1052 | "execution_count": 224,
1053 | "metadata": {},
1054 | "output_type": "execute_result"
1055 | }
1056 | ],
1057 | "source": [
1058 | "low=my_string.lower()\n",
1059 | "low"
1060 | ]
1061 | },
1062 | {
1063 | "cell_type": "code",
1064 | "execution_count": 225,
1065 | "metadata": {
1066 | "scrolled": true
1067 | },
1068 | "outputs": [
1069 | {
1070 | "data": {
1071 | "text/plain": [
1072 | "1"
1073 | ]
1074 | },
1075 | "execution_count": 225,
1076 | "metadata": {},
1077 | "output_type": "execute_result"
1078 | }
1079 | ],
1080 | "source": [
1081 | "cout=my_string.count('o')\n",
1082 | "cout"
1083 | ]
1084 | },
1085 | {
1086 | "cell_type": "code",
1087 | "execution_count": 226,
1088 | "metadata": {
1089 | "scrolled": true
1090 | },
1091 | "outputs": [
1092 | {
1093 | "data": {
1094 | "text/plain": [
1095 | "'CSK won IPL title 2 times'"
1096 | ]
1097 | },
1098 | "execution_count": 226,
1099 | "metadata": {},
1100 | "output_type": "execute_result"
1101 | }
1102 | ],
1103 | "source": [
1104 | "\n",
1105 | "my_string=my_string.replace('MI', 'CSK')\n",
1106 | "my_string=my_string.replace('4','2')\n",
1107 | "my_string"
1108 | ]
1109 | },
1110 | {
1111 | "cell_type": "markdown",
1112 | "metadata": {},
1113 | "source": [
1114 | "## Dictionary\n"
1115 | ]
1116 | },
1117 | {
1118 | "cell_type": "code",
1119 | "execution_count": 227,
1120 | "metadata": {},
1121 | "outputs": [],
1122 | "source": [
1123 | "# empty dictionary\n",
1124 | "my_dict = {}\n",
1125 | "\n",
1126 | "# dictionary with string key\n",
1127 | "ipl_sixes = {'russell':62, 'gayle':34,'Pandya':29,'pant':27,'ABD':26,'rahul':25}\n",
1128 | "\n",
1129 | "# dictionary with integer key\n",
1130 | "ipl_bolwer_rank = {1:'Imran Tahir',2:'Kagiso Rabada',3:'Deepak Chahar',4: 'Shreyas Gopal',5:' Jasprit Bumrah',6:' Khaleel Ahmed',7:' Mohammed Shami',8:' Yuzvendra Chahal',9:'Rashid Khan',10:' Harbhajan Singh'}\n",
1131 | "\n",
1132 | "# using dict()\n",
1133 | "ipl_team_rank = dict([(1,'MI'), (2,'CSK'), (3,'DC'), (4,'SH'), (5,'KKR'),(6,'KXIP'),(7,'RR'),(8,'RCB')])"
1134 | ]
1135 | },
1136 | {
1137 | "cell_type": "code",
1138 | "execution_count": 228,
1139 | "metadata": {},
1140 | "outputs": [
1141 | {
1142 | "data": {
1143 | "text/plain": [
1144 | "62"
1145 | ]
1146 | },
1147 | "execution_count": 228,
1148 | "metadata": {},
1149 | "output_type": "execute_result"
1150 | }
1151 | ],
1152 | "source": [
1153 | "ipl_sixes['russell']"
1154 | ]
1155 | },
1156 | {
1157 | "cell_type": "code",
1158 | "execution_count": 229,
1159 | "metadata": {},
1160 | "outputs": [
1161 | {
1162 | "data": {
1163 | "text/plain": [
1164 | "'Shreyas Gopal'"
1165 | ]
1166 | },
1167 | "execution_count": 229,
1168 | "metadata": {},
1169 | "output_type": "execute_result"
1170 | }
1171 | ],
1172 | "source": [
1173 | "ipl_bolwer_rank[4]"
1174 | ]
1175 | },
1176 | {
1177 | "cell_type": "code",
1178 | "execution_count": 230,
1179 | "metadata": {},
1180 | "outputs": [
1181 | {
1182 | "data": {
1183 | "text/plain": [
1184 | "'MI'"
1185 | ]
1186 | },
1187 | "execution_count": 230,
1188 | "metadata": {},
1189 | "output_type": "execute_result"
1190 | }
1191 | ],
1192 | "source": [
1193 | "ipl_team_rank[1]"
1194 | ]
1195 | },
1196 | {
1197 | "cell_type": "markdown",
1198 | "metadata": {},
1199 | "source": [
1200 | "## Loops"
1201 | ]
1202 | },
1203 | {
1204 | "cell_type": "code",
1205 | "execution_count": 231,
1206 | "metadata": {
1207 | "scrolled": true
1208 | },
1209 | "outputs": [
1210 | {
1211 | "name": "stdout",
1212 | "output_type": "stream",
1213 | "text": [
1214 | "0\n",
1215 | "1\n",
1216 | "2\n",
1217 | "3\n",
1218 | "4\n",
1219 | "5\n",
1220 | "6\n",
1221 | "7\n",
1222 | "8\n",
1223 | "9\n"
1224 | ]
1225 | }
1226 | ],
1227 | "source": [
1228 | "for i in range(0,10):\n",
1229 | " print(i)"
1230 | ]
1231 | },
1232 | {
1233 | "cell_type": "code",
1234 | "execution_count": 232,
1235 | "metadata": {
1236 | "scrolled": true
1237 | },
1238 | "outputs": [
1239 | {
1240 | "name": "stdout",
1241 | "output_type": "stream",
1242 | "text": [
1243 | "1\n",
1244 | "3\n",
1245 | "5\n",
1246 | "7\n",
1247 | "9\n"
1248 | ]
1249 | }
1250 | ],
1251 | "source": [
1252 | "for i in range(1,10,2):\n",
1253 | " print(i)"
1254 | ]
1255 | },
1256 | {
1257 | "cell_type": "code",
1258 | "execution_count": 233,
1259 | "metadata": {
1260 | "scrolled": true
1261 | },
1262 | "outputs": [
1263 | {
1264 | "name": "stdout",
1265 | "output_type": "stream",
1266 | "text": [
1267 | "0\n",
1268 | "1\n",
1269 | "4\n",
1270 | "9\n",
1271 | "16\n"
1272 | ]
1273 | }
1274 | ],
1275 | "source": [
1276 | "for x in range(5):\n",
1277 | " print(x**2)"
1278 | ]
1279 | },
1280 | {
1281 | "cell_type": "code",
1282 | "execution_count": 234,
1283 | "metadata": {
1284 | "scrolled": true
1285 | },
1286 | "outputs": [
1287 | {
1288 | "name": "stdout",
1289 | "output_type": "stream",
1290 | "text": [
1291 | "I love to watching play Virat Kohli\n",
1292 | "I love to watching play KL Rahul\n",
1293 | "I love to watching play Jasprit Bumrah\n"
1294 | ]
1295 | }
1296 | ],
1297 | "source": [
1298 | "names=['Virat Kohli','KL Rahul',' Jasprit Bumrah']\n",
1299 | "for i in names:\n",
1300 | " print(\"I love to watching play \"+i)"
1301 | ]
1302 | },
1303 | {
1304 | "cell_type": "code",
1305 | "execution_count": 235,
1306 | "metadata": {
1307 | "scrolled": true
1308 | },
1309 | "outputs": [],
1310 | "source": [
1311 | "count = 0\n",
1312 | "while count >5 :\n",
1313 | " print(count)\n",
1314 | " count += 1"
1315 | ]
1316 | },
1317 | {
1318 | "cell_type": "code",
1319 | "execution_count": 236,
1320 | "metadata": {
1321 | "scrolled": true
1322 | },
1323 | "outputs": [
1324 | {
1325 | "name": "stdout",
1326 | "output_type": "stream",
1327 | "text": [
1328 | "0\n",
1329 | "1\n",
1330 | "2\n",
1331 | "3\n",
1332 | "4\n",
1333 | "exit value 5\n"
1334 | ]
1335 | }
1336 | ],
1337 | "source": [
1338 | "count=0\n",
1339 | "while(count<5):\n",
1340 | " print(count)\n",
1341 | " count +=1\n",
1342 | "else:\n",
1343 | " print(\"exit value %d\" %(count))"
1344 | ]
1345 | },
1346 | {
1347 | "cell_type": "code",
1348 | "execution_count": 237,
1349 | "metadata": {
1350 | "scrolled": true
1351 | },
1352 | "outputs": [
1353 | {
1354 | "name": "stdout",
1355 | "output_type": "stream",
1356 | "text": [
1357 | "this is else part 1\n",
1358 | "this is else part 2\n",
1359 | "this is else part 3\n",
1360 | "this is else part 4\n",
1361 | "5\n",
1362 | "this is else part 6\n",
1363 | "this is else part 7\n",
1364 | "this is else part 8\n",
1365 | "this is else part 9\n"
1366 | ]
1367 | }
1368 | ],
1369 | "source": [
1370 | "for i in range(1, 10):\n",
1371 | " if(i%5==0):\n",
1372 | " print(i)\n",
1373 | " else:\n",
1374 | " print(\"this is else part\",i)"
1375 | ]
1376 | },
1377 | {
1378 | "cell_type": "code",
1379 | "execution_count": 238,
1380 | "metadata": {
1381 | "scrolled": true
1382 | },
1383 | "outputs": [
1384 | {
1385 | "name": "stdout",
1386 | "output_type": "stream",
1387 | "text": [
1388 | " is even 10\n",
1389 | " is odd 11\n",
1390 | " is even 12\n",
1391 | " is odd 13\n",
1392 | " is even 14\n",
1393 | " is odd 15\n",
1394 | " is even 16\n",
1395 | " is odd 17\n",
1396 | " is even 18\n",
1397 | " is odd 19\n"
1398 | ]
1399 | }
1400 | ],
1401 | "source": [
1402 | "for i in range(10,20):\n",
1403 | " if(i%2==0):\n",
1404 | " print(\" is even\",i)\n",
1405 | " else:\n",
1406 | " print(\" is odd\",i)"
1407 | ]
1408 | },
1409 | {
1410 | "cell_type": "code",
1411 | "execution_count": 239,
1412 | "metadata": {
1413 | "scrolled": true
1414 | },
1415 | "outputs": [
1416 | {
1417 | "name": "stdout",
1418 | "output_type": "stream",
1419 | "text": [
1420 | "1 * 1 = 1\n",
1421 | "1 * 2 = 1\n",
1422 | "2 * 1 = 2\n",
1423 | "2 * 2 = 4\n"
1424 | ]
1425 | }
1426 | ],
1427 | "source": [
1428 | "for x in range(1, 3):\n",
1429 | " for y in range(1, 3):\n",
1430 | " print('%d * %d = %d' % (x, y, x**y))"
1431 | ]
1432 | },
1433 | {
1434 | "cell_type": "markdown",
1435 | "metadata": {},
1436 | "source": [
1437 | "### Pass Continue break"
1438 | ]
1439 | },
1440 | {
1441 | "cell_type": "code",
1442 | "execution_count": 240,
1443 | "metadata": {},
1444 | "outputs": [
1445 | {
1446 | "name": "stdout",
1447 | "output_type": "stream",
1448 | "text": [
1449 | "c\n",
1450 | "The end\n"
1451 | ]
1452 | }
1453 | ],
1454 | "source": [
1455 | "for val in \"I am coder\":\n",
1456 | " if val == \"c\":\n",
1457 | " #break\n",
1458 | " #continue\n",
1459 | " pass\n",
1460 | " print(val)\n",
1461 | "print(\"The end\")"
1462 | ]
1463 | },
1464 | {
1465 | "cell_type": "markdown",
1466 | "metadata": {},
1467 | "source": [
1468 | "## Function\n"
1469 | ]
1470 | },
1471 | {
1472 | "cell_type": "code",
1473 | "execution_count": 241,
1474 | "metadata": {
1475 | "scrolled": true
1476 | },
1477 | "outputs": [],
1478 | "source": [
1479 | "def add(a,b):\n",
1480 | " return a + b"
1481 | ]
1482 | },
1483 | {
1484 | "cell_type": "code",
1485 | "execution_count": 242,
1486 | "metadata": {
1487 | "scrolled": true
1488 | },
1489 | "outputs": [
1490 | {
1491 | "data": {
1492 | "text/plain": [
1493 | "13"
1494 | ]
1495 | },
1496 | "execution_count": 242,
1497 | "metadata": {},
1498 | "output_type": "execute_result"
1499 | }
1500 | ],
1501 | "source": [
1502 | "add(7,6)"
1503 | ]
1504 | },
1505 | {
1506 | "cell_type": "code",
1507 | "execution_count": 243,
1508 | "metadata": {
1509 | "scrolled": true
1510 | },
1511 | "outputs": [
1512 | {
1513 | "data": {
1514 | "text/plain": [
1515 | "8"
1516 | ]
1517 | },
1518 | "execution_count": 243,
1519 | "metadata": {},
1520 | "output_type": "execute_result"
1521 | }
1522 | ],
1523 | "source": [
1524 | "def cube(a):\n",
1525 | " a=a*a*a\n",
1526 | " return a\n",
1527 | "cube(2)"
1528 | ]
1529 | },
1530 | {
1531 | "cell_type": "markdown",
1532 | "metadata": {},
1533 | "source": [
1534 | "user input and calculate nth fibonacci number"
1535 | ]
1536 | },
1537 | {
1538 | "cell_type": "code",
1539 | "execution_count": 244,
1540 | "metadata": {},
1541 | "outputs": [
1542 | {
1543 | "name": "stdout",
1544 | "output_type": "stream",
1545 | "text": [
1546 | "enter number : 66\n"
1547 | ]
1548 | }
1549 | ],
1550 | "source": [
1551 | "inp=input(\"enter number : \")"
1552 | ]
1553 | },
1554 | {
1555 | "cell_type": "code",
1556 | "execution_count": 245,
1557 | "metadata": {},
1558 | "outputs": [
1559 | {
1560 | "data": {
1561 | "text/plain": [
1562 | "66"
1563 | ]
1564 | },
1565 | "execution_count": 245,
1566 | "metadata": {},
1567 | "output_type": "execute_result"
1568 | }
1569 | ],
1570 | "source": [
1571 | "a=int(inp) \n",
1572 | "a"
1573 | ]
1574 | },
1575 | {
1576 | "cell_type": "code",
1577 | "execution_count": 246,
1578 | "metadata": {},
1579 | "outputs": [
1580 | {
1581 | "name": "stdout",
1582 | "output_type": "stream",
1583 | "text": [
1584 | "the 3 term of fibonacci is : 1\n",
1585 | "the 4 term of fibonacci is : 2\n",
1586 | "the 5 term of fibonacci is : 3\n",
1587 | "the 6 term of fibonacci is : 5\n",
1588 | "the 7 term of fibonacci is : 8\n",
1589 | "the 8 term of fibonacci is : 13\n",
1590 | "the 9 term of fibonacci is : 21\n",
1591 | "the 10 term of fibonacci is : 34\n",
1592 | "the 11 term of fibonacci is : 55\n",
1593 | "the 12 term of fibonacci is : 89\n",
1594 | "the 13 term of fibonacci is : 144\n",
1595 | "the 14 term of fibonacci is : 233\n",
1596 | "the 15 term of fibonacci is : 377\n",
1597 | "the 16 term of fibonacci is : 610\n",
1598 | "the 17 term of fibonacci is : 987\n",
1599 | "the 18 term of fibonacci is : 1597\n",
1600 | "the 19 term of fibonacci is : 2584\n",
1601 | "the 20 term of fibonacci is : 4181\n",
1602 | "the 21 term of fibonacci is : 6765\n",
1603 | "the 22 term of fibonacci is : 10946\n",
1604 | "the 23 term of fibonacci is : 17711\n",
1605 | "the 24 term of fibonacci is : 28657\n",
1606 | "the 25 term of fibonacci is : 46368\n",
1607 | "the 26 term of fibonacci is : 75025\n",
1608 | "the 27 term of fibonacci is : 121393\n",
1609 | "the 28 term of fibonacci is : 196418\n",
1610 | "the 29 term of fibonacci is : 317811\n",
1611 | "the 30 term of fibonacci is : 514229\n",
1612 | "the 31 term of fibonacci is : 832040\n",
1613 | "the 32 term of fibonacci is : 1346269\n",
1614 | "the 33 term of fibonacci is : 2178309\n",
1615 | "the 34 term of fibonacci is : 3524578\n",
1616 | "the 35 term of fibonacci is : 5702887\n",
1617 | "the 36 term of fibonacci is : 9227465\n",
1618 | "the 37 term of fibonacci is : 14930352\n",
1619 | "the 38 term of fibonacci is : 24157817\n",
1620 | "the 39 term of fibonacci is : 39088169\n",
1621 | "the 40 term of fibonacci is : 63245986\n",
1622 | "the 41 term of fibonacci is : 102334155\n",
1623 | "the 42 term of fibonacci is : 165580141\n",
1624 | "the 43 term of fibonacci is : 267914296\n",
1625 | "the 44 term of fibonacci is : 433494437\n",
1626 | "the 45 term of fibonacci is : 701408733\n",
1627 | "the 46 term of fibonacci is : 1134903170\n",
1628 | "the 47 term of fibonacci is : 1836311903\n",
1629 | "the 48 term of fibonacci is : 2971215073\n",
1630 | "the 49 term of fibonacci is : 4807526976\n",
1631 | "the 50 term of fibonacci is : 7778742049\n",
1632 | "the 51 term of fibonacci is : 12586269025\n",
1633 | "the 52 term of fibonacci is : 20365011074\n",
1634 | "the 53 term of fibonacci is : 32951280099\n",
1635 | "the 54 term of fibonacci is : 53316291173\n",
1636 | "the 55 term of fibonacci is : 86267571272\n",
1637 | "the 56 term of fibonacci is : 139583862445\n",
1638 | "the 57 term of fibonacci is : 225851433717\n",
1639 | "the 58 term of fibonacci is : 365435296162\n",
1640 | "the 59 term of fibonacci is : 591286729879\n",
1641 | "the 60 term of fibonacci is : 956722026041\n",
1642 | "the 61 term of fibonacci is : 1548008755920\n",
1643 | "the 62 term of fibonacci is : 2504730781961\n",
1644 | "the 63 term of fibonacci is : 4052739537881\n",
1645 | "the 64 term of fibonacci is : 6557470319842\n",
1646 | "the 65 term of fibonacci is : 10610209857723\n",
1647 | "the 66 term of fibonacci is : 17167680177565\n",
1648 | "the 67 term of fibonacci is : 27777890035288\n",
1649 | "the 68 term of fibonacci is : 44945570212853\n"
1650 | ]
1651 | }
1652 | ],
1653 | "source": [
1654 | "first=0;second=1\n",
1655 | "n=0;\n",
1656 | "for i in range(a):\n",
1657 | " n=first+second;\n",
1658 | " first=second;\n",
1659 | " second=n;\n",
1660 | " print(\"the \"+str(i+3)+\" term of fibonacci is : \"+str(n)) \n",
1661 | " #print(\"The\",i+3,\"term of fibonacci is :\",n) \n",
1662 | "\n",
1663 | " \n",
1664 | " "
1665 | ]
1666 | },
1667 | {
1668 | "cell_type": "markdown",
1669 | "metadata": {
1670 | "collapsed": true,
1671 | "scrolled": true
1672 | },
1673 | "source": [
1674 | "## File I/O"
1675 | ]
1676 | },
1677 | {
1678 | "cell_type": "code",
1679 | "execution_count": 247,
1680 | "metadata": {
1681 | "scrolled": true
1682 | },
1683 | "outputs": [
1684 | {
1685 | "name": "stdout",
1686 | "output_type": "stream",
1687 | "text": [
1688 | "How are you ?\n",
1689 | "\n"
1690 | ]
1691 | }
1692 | ],
1693 | "source": [
1694 | "dat=input(\"How are you ?\\n\")"
1695 | ]
1696 | },
1697 | {
1698 | "cell_type": "code",
1699 | "execution_count": 248,
1700 | "metadata": {},
1701 | "outputs": [],
1702 | "source": [
1703 | "#open file\n",
1704 | "fo = open(\"ipl_team.txt\", \"w\")\n",
1705 | "fo.write( \"The Indian Premier League (IPL) is a professional Twenty20 cricket league in India contested during March or April and May of every year by eight teams representing eight different cities in India.[3] The league was founded by the Board of Control for Cricket in India (BCCI) in 2008. IPL has an exclusive window in ICC Future Tours Programme.[4] The IPL is the most-attended cricket league in the world and in 2014 ranked\")\n",
1706 | "# Close opend file\n",
1707 | "fo.close()"
1708 | ]
1709 | },
1710 | {
1711 | "cell_type": "code",
1712 | "execution_count": 249,
1713 | "metadata": {},
1714 | "outputs": [
1715 | {
1716 | "data": {
1717 | "text/plain": [
1718 | "'/home/pradip'"
1719 | ]
1720 | },
1721 | "execution_count": 249,
1722 | "metadata": {},
1723 | "output_type": "execute_result"
1724 | }
1725 | ],
1726 | "source": [
1727 | "pwd"
1728 | ]
1729 | },
1730 | {
1731 | "cell_type": "code",
1732 | "execution_count": 250,
1733 | "metadata": {},
1734 | "outputs": [
1735 | {
1736 | "name": "stdout",
1737 | "output_type": "stream",
1738 | "text": [
1739 | "The Indian Premier League (IPL) is a professional Twenty20 cricket league in India contested during March or April and May of every year by eight teams representing eight different cities in India.[3] The league was founded by the Board of Control for Cricket in India (BCCI) in 2008. IPL has an exclusive window in ICC Future Tours Programme.[4] The IPL is the most-attended cricket league in the world and in 2014 ranked\n"
1740 | ]
1741 | }
1742 | ],
1743 | "source": [
1744 | "fo = open(\"ipl_team.txt\", \"r\")\n",
1745 | "st1=fo.readline()\n",
1746 | "print( st1)\n"
1747 | ]
1748 | },
1749 | {
1750 | "cell_type": "code",
1751 | "execution_count": null,
1752 | "metadata": {},
1753 | "outputs": [],
1754 | "source": []
1755 | },
1756 | {
1757 | "cell_type": "code",
1758 | "execution_count": null,
1759 | "metadata": {},
1760 | "outputs": [],
1761 | "source": []
1762 | },
1763 | {
1764 | "cell_type": "code",
1765 | "execution_count": 251,
1766 | "metadata": {},
1767 | "outputs": [],
1768 | "source": [
1769 | "sixes_data = pd.read_csv(\"Desktop/ipl_data/most_sixes_all_times.csv\")\n",
1770 | "wickets_data = pd.read_csv(\"Desktop/ipl_data/most_wickets_all_times.csv\")\n"
1771 | ]
1772 | },
1773 | {
1774 | "cell_type": "code",
1775 | "execution_count": 252,
1776 | "metadata": {},
1777 | "outputs": [
1778 | {
1779 | "name": "stdout",
1780 | "output_type": "stream",
1781 | "text": [
1782 | "Sixes:\n"
1783 | ]
1784 | },
1785 | {
1786 | "data": {
1787 | "text/html": [
1788 | "\n",
1789 | "\n",
1802 | "
\n",
1803 | " \n",
1804 | " \n",
1805 | " | \n",
1806 | " id | \n",
1807 | " Player | \n",
1808 | " Sixes | \n",
1809 | " Country | \n",
1810 | "
\n",
1811 | " \n",
1812 | " \n",
1813 | " \n",
1814 | " 0 | \n",
1815 | " 1 | \n",
1816 | " ChrisGayle | \n",
1817 | " 326 | \n",
1818 | " WI | \n",
1819 | "
\n",
1820 | " \n",
1821 | " 1 | \n",
1822 | " 2 | \n",
1823 | " AB de Villiers | \n",
1824 | " 212 | \n",
1825 | " SA | \n",
1826 | "
\n",
1827 | " \n",
1828 | " 2 | \n",
1829 | " 3 | \n",
1830 | " MS Dhoni | \n",
1831 | " 209 | \n",
1832 | " Ind | \n",
1833 | "
\n",
1834 | " \n",
1835 | " 3 | \n",
1836 | " 4 | \n",
1837 | " Rohit Sharma | \n",
1838 | " 194 | \n",
1839 | " Ind | \n",
1840 | "
\n",
1841 | " \n",
1842 | " 4 | \n",
1843 | " 5 | \n",
1844 | " Suresh Raina | \n",
1845 | " 194 | \n",
1846 | " Ind | \n",
1847 | "
\n",
1848 | " \n",
1849 | "
\n",
1850 | "
"
1851 | ],
1852 | "text/plain": [
1853 | " id Player Sixes Country\n",
1854 | "0 1 ChrisGayle 326 WI\n",
1855 | "1 2 AB de Villiers 212 SA\n",
1856 | "2 3 MS Dhoni 209 Ind\n",
1857 | "3 4 Rohit Sharma 194 Ind\n",
1858 | "4 5 Suresh Raina 194 Ind"
1859 | ]
1860 | },
1861 | "metadata": {},
1862 | "output_type": "display_data"
1863 | },
1864 | {
1865 | "name": "stdout",
1866 | "output_type": "stream",
1867 | "text": [
1868 | "\n",
1869 | "\n"
1870 | ]
1871 | }
1872 | ],
1873 | "source": [
1874 | "print(\"Sixes:\")\n",
1875 | "display(sixes_data.head())\n",
1876 | "print(\"\\n\")\n"
1877 | ]
1878 | },
1879 | {
1880 | "cell_type": "code",
1881 | "execution_count": 253,
1882 | "metadata": {},
1883 | "outputs": [
1884 | {
1885 | "data": {
1886 | "application/vnd.plotly.v1+json": {
1887 | "config": {
1888 | "linkText": "Export to plot.ly",
1889 | "plotlyServerURL": "https://plot.ly",
1890 | "showLink": false
1891 | },
1892 | "data": [
1893 | {
1894 | "alignmentgroup": "True",
1895 | "hoverlabel": {
1896 | "namelength": 0
1897 | },
1898 | "hovertemplate": "Player=%{x}
Sixes=%{y}",
1899 | "legendgroup": "",
1900 | "marker": {
1901 | "color": "#636efa"
1902 | },
1903 | "name": "",
1904 | "offsetgroup": "",
1905 | "orientation": "v",
1906 | "showlegend": false,
1907 | "textposition": "auto",
1908 | "type": "bar",
1909 | "uid": "716929d5-2ec6-4153-9ca5-19d9e727af57",
1910 | "x": [
1911 | "ChrisGayle",
1912 | " AB de Villiers",
1913 | " MS Dhoni",
1914 | " Rohit Sharma",
1915 | " Suresh Raina",
1916 | " Virat Kohli",
1917 | " David Warner",
1918 | " Shane Watson",
1919 | " Kieron Pollard",
1920 | " Yusuf Pathan",
1921 | " Robin Uthappa",
1922 | " Yuvraj Singh",
1923 | " Brendon McCullum",
1924 | " Andre Russell",
1925 | " Ambati Rayudu",
1926 | " Dwayne Smith",
1927 | " Virender Sehwag",
1928 | " Dinesh Karthik",
1929 | " Shikhar Dhawan",
1930 | " Rishabh Pant",
1931 | " Adam Gilchrist",
1932 | " Glenn Maxwell",
1933 | " Murali Vijay",
1934 | " Sanju Samson",
1935 | " David Miller",
1936 | " KL Rahul",
1937 | " JP Duminy",
1938 | " Naman Ojha",
1939 | " Shaun Marsh",
1940 | " Manish Pandey"
1941 | ],
1942 | "xaxis": "x",
1943 | "y": [
1944 | 326,
1945 | 212,
1946 | 209,
1947 | 194,
1948 | 194,
1949 | 191,
1950 | 181,
1951 | 177,
1952 | 176,
1953 | 158,
1954 | 156,
1955 | 149,
1956 | 130,
1957 | 120,
1958 | 120,
1959 | 117,
1960 | 106,
1961 | 101,
1962 | 96,
1963 | 94,
1964 | 92,
1965 | 91,
1966 | 91,
1967 | 89,
1968 | 87,
1969 | 81,
1970 | 79,
1971 | 79,
1972 | 78,
1973 | 75
1974 | ],
1975 | "yaxis": "y"
1976 | }
1977 | ],
1978 | "layout": {
1979 | "barmode": "relative",
1980 | "grid": {
1981 | "xaxes": [
1982 | "x"
1983 | ],
1984 | "xgap": 0.1,
1985 | "xside": "bottom",
1986 | "yaxes": [
1987 | "y"
1988 | ],
1989 | "ygap": 0.1,
1990 | "yside": "left"
1991 | },
1992 | "height": 600,
1993 | "legend": {
1994 | "tracegroupgap": 0
1995 | },
1996 | "template": {
1997 | "data": {
1998 | "bar": [
1999 | {
2000 | "marker": {
2001 | "line": {
2002 | "color": "#E5ECF6",
2003 | "width": 0.5
2004 | }
2005 | },
2006 | "type": "bar"
2007 | }
2008 | ],
2009 | "barpolar": [
2010 | {
2011 | "marker": {
2012 | "line": {
2013 | "color": "#E5ECF6",
2014 | "width": 0.5
2015 | }
2016 | },
2017 | "type": "barpolar"
2018 | }
2019 | ],
2020 | "carpet": [
2021 | {
2022 | "aaxis": {
2023 | "endlinecolor": "#2a3f5f",
2024 | "gridcolor": "white",
2025 | "linecolor": "white",
2026 | "minorgridcolor": "white",
2027 | "startlinecolor": "#2a3f5f"
2028 | },
2029 | "baxis": {
2030 | "endlinecolor": "#2a3f5f",
2031 | "gridcolor": "white",
2032 | "linecolor": "white",
2033 | "minorgridcolor": "white",
2034 | "startlinecolor": "#2a3f5f"
2035 | },
2036 | "type": "carpet"
2037 | }
2038 | ],
2039 | "choropleth": [
2040 | {
2041 | "colorbar": {
2042 | "outlinewidth": 0,
2043 | "ticks": ""
2044 | },
2045 | "type": "choropleth"
2046 | }
2047 | ],
2048 | "contour": [
2049 | {
2050 | "colorbar": {
2051 | "outlinewidth": 0,
2052 | "ticks": ""
2053 | },
2054 | "colorscale": [
2055 | [
2056 | 0,
2057 | "#0508b8"
2058 | ],
2059 | [
2060 | 0.0893854748603352,
2061 | "#1910d8"
2062 | ],
2063 | [
2064 | 0.1787709497206704,
2065 | "#3c19f0"
2066 | ],
2067 | [
2068 | 0.2681564245810056,
2069 | "#6b1cfb"
2070 | ],
2071 | [
2072 | 0.3575418994413408,
2073 | "#981cfd"
2074 | ],
2075 | [
2076 | 0.44692737430167595,
2077 | "#bf1cfd"
2078 | ],
2079 | [
2080 | 0.5363128491620112,
2081 | "#dd2bfd"
2082 | ],
2083 | [
2084 | 0.6256983240223464,
2085 | "#f246fe"
2086 | ],
2087 | [
2088 | 0.7150837988826816,
2089 | "#fc67fd"
2090 | ],
2091 | [
2092 | 0.8044692737430168,
2093 | "#fe88fc"
2094 | ],
2095 | [
2096 | 0.8938547486033519,
2097 | "#fea5fd"
2098 | ],
2099 | [
2100 | 0.9832402234636871,
2101 | "#febefe"
2102 | ],
2103 | [
2104 | 1,
2105 | "#fec3fe"
2106 | ]
2107 | ],
2108 | "type": "contour"
2109 | }
2110 | ],
2111 | "contourcarpet": [
2112 | {
2113 | "colorbar": {
2114 | "outlinewidth": 0,
2115 | "ticks": ""
2116 | },
2117 | "type": "contourcarpet"
2118 | }
2119 | ],
2120 | "heatmap": [
2121 | {
2122 | "colorbar": {
2123 | "outlinewidth": 0,
2124 | "ticks": ""
2125 | },
2126 | "colorscale": [
2127 | [
2128 | 0,
2129 | "#0508b8"
2130 | ],
2131 | [
2132 | 0.0893854748603352,
2133 | "#1910d8"
2134 | ],
2135 | [
2136 | 0.1787709497206704,
2137 | "#3c19f0"
2138 | ],
2139 | [
2140 | 0.2681564245810056,
2141 | "#6b1cfb"
2142 | ],
2143 | [
2144 | 0.3575418994413408,
2145 | "#981cfd"
2146 | ],
2147 | [
2148 | 0.44692737430167595,
2149 | "#bf1cfd"
2150 | ],
2151 | [
2152 | 0.5363128491620112,
2153 | "#dd2bfd"
2154 | ],
2155 | [
2156 | 0.6256983240223464,
2157 | "#f246fe"
2158 | ],
2159 | [
2160 | 0.7150837988826816,
2161 | "#fc67fd"
2162 | ],
2163 | [
2164 | 0.8044692737430168,
2165 | "#fe88fc"
2166 | ],
2167 | [
2168 | 0.8938547486033519,
2169 | "#fea5fd"
2170 | ],
2171 | [
2172 | 0.9832402234636871,
2173 | "#febefe"
2174 | ],
2175 | [
2176 | 1,
2177 | "#fec3fe"
2178 | ]
2179 | ],
2180 | "type": "heatmap"
2181 | }
2182 | ],
2183 | "heatmapgl": [
2184 | {
2185 | "colorbar": {
2186 | "outlinewidth": 0,
2187 | "ticks": ""
2188 | },
2189 | "type": "heatmapgl"
2190 | }
2191 | ],
2192 | "histogram": [
2193 | {
2194 | "marker": {
2195 | "colorbar": {
2196 | "outlinewidth": 0,
2197 | "ticks": ""
2198 | }
2199 | },
2200 | "type": "histogram"
2201 | }
2202 | ],
2203 | "histogram2d": [
2204 | {
2205 | "colorbar": {
2206 | "outlinewidth": 0,
2207 | "ticks": ""
2208 | },
2209 | "colorscale": [
2210 | [
2211 | 0,
2212 | "#0508b8"
2213 | ],
2214 | [
2215 | 0.0893854748603352,
2216 | "#1910d8"
2217 | ],
2218 | [
2219 | 0.1787709497206704,
2220 | "#3c19f0"
2221 | ],
2222 | [
2223 | 0.2681564245810056,
2224 | "#6b1cfb"
2225 | ],
2226 | [
2227 | 0.3575418994413408,
2228 | "#981cfd"
2229 | ],
2230 | [
2231 | 0.44692737430167595,
2232 | "#bf1cfd"
2233 | ],
2234 | [
2235 | 0.5363128491620112,
2236 | "#dd2bfd"
2237 | ],
2238 | [
2239 | 0.6256983240223464,
2240 | "#f246fe"
2241 | ],
2242 | [
2243 | 0.7150837988826816,
2244 | "#fc67fd"
2245 | ],
2246 | [
2247 | 0.8044692737430168,
2248 | "#fe88fc"
2249 | ],
2250 | [
2251 | 0.8938547486033519,
2252 | "#fea5fd"
2253 | ],
2254 | [
2255 | 0.9832402234636871,
2256 | "#febefe"
2257 | ],
2258 | [
2259 | 1,
2260 | "#fec3fe"
2261 | ]
2262 | ],
2263 | "type": "histogram2d"
2264 | }
2265 | ],
2266 | "histogram2dcontour": [
2267 | {
2268 | "colorbar": {
2269 | "outlinewidth": 0,
2270 | "ticks": ""
2271 | },
2272 | "colorscale": [
2273 | [
2274 | 0,
2275 | "#0508b8"
2276 | ],
2277 | [
2278 | 0.0893854748603352,
2279 | "#1910d8"
2280 | ],
2281 | [
2282 | 0.1787709497206704,
2283 | "#3c19f0"
2284 | ],
2285 | [
2286 | 0.2681564245810056,
2287 | "#6b1cfb"
2288 | ],
2289 | [
2290 | 0.3575418994413408,
2291 | "#981cfd"
2292 | ],
2293 | [
2294 | 0.44692737430167595,
2295 | "#bf1cfd"
2296 | ],
2297 | [
2298 | 0.5363128491620112,
2299 | "#dd2bfd"
2300 | ],
2301 | [
2302 | 0.6256983240223464,
2303 | "#f246fe"
2304 | ],
2305 | [
2306 | 0.7150837988826816,
2307 | "#fc67fd"
2308 | ],
2309 | [
2310 | 0.8044692737430168,
2311 | "#fe88fc"
2312 | ],
2313 | [
2314 | 0.8938547486033519,
2315 | "#fea5fd"
2316 | ],
2317 | [
2318 | 0.9832402234636871,
2319 | "#febefe"
2320 | ],
2321 | [
2322 | 1,
2323 | "#fec3fe"
2324 | ]
2325 | ],
2326 | "type": "histogram2dcontour"
2327 | }
2328 | ],
2329 | "mesh3d": [
2330 | {
2331 | "colorbar": {
2332 | "outlinewidth": 0,
2333 | "ticks": ""
2334 | },
2335 | "type": "mesh3d"
2336 | }
2337 | ],
2338 | "parcoords": [
2339 | {
2340 | "line": {
2341 | "colorbar": {
2342 | "outlinewidth": 0,
2343 | "ticks": ""
2344 | }
2345 | },
2346 | "type": "parcoords"
2347 | }
2348 | ],
2349 | "scatter": [
2350 | {
2351 | "marker": {
2352 | "colorbar": {
2353 | "outlinewidth": 0,
2354 | "ticks": ""
2355 | }
2356 | },
2357 | "type": "scatter"
2358 | }
2359 | ],
2360 | "scatter3d": [
2361 | {
2362 | "marker": {
2363 | "colorbar": {
2364 | "outlinewidth": 0,
2365 | "ticks": ""
2366 | }
2367 | },
2368 | "type": "scatter3d"
2369 | }
2370 | ],
2371 | "scattercarpet": [
2372 | {
2373 | "marker": {
2374 | "colorbar": {
2375 | "outlinewidth": 0,
2376 | "ticks": ""
2377 | }
2378 | },
2379 | "type": "scattercarpet"
2380 | }
2381 | ],
2382 | "scattergeo": [
2383 | {
2384 | "marker": {
2385 | "colorbar": {
2386 | "outlinewidth": 0,
2387 | "ticks": ""
2388 | }
2389 | },
2390 | "type": "scattergeo"
2391 | }
2392 | ],
2393 | "scattergl": [
2394 | {
2395 | "marker": {
2396 | "colorbar": {
2397 | "outlinewidth": 0,
2398 | "ticks": ""
2399 | }
2400 | },
2401 | "type": "scattergl"
2402 | }
2403 | ],
2404 | "scattermapbox": [
2405 | {
2406 | "marker": {
2407 | "colorbar": {
2408 | "outlinewidth": 0,
2409 | "ticks": ""
2410 | }
2411 | },
2412 | "type": "scattermapbox"
2413 | }
2414 | ],
2415 | "scatterpolar": [
2416 | {
2417 | "marker": {
2418 | "colorbar": {
2419 | "outlinewidth": 0,
2420 | "ticks": ""
2421 | }
2422 | },
2423 | "type": "scatterpolar"
2424 | }
2425 | ],
2426 | "scatterpolargl": [
2427 | {
2428 | "marker": {
2429 | "colorbar": {
2430 | "outlinewidth": 0,
2431 | "ticks": ""
2432 | }
2433 | },
2434 | "type": "scatterpolargl"
2435 | }
2436 | ],
2437 | "scatterternary": [
2438 | {
2439 | "marker": {
2440 | "colorbar": {
2441 | "outlinewidth": 0,
2442 | "ticks": ""
2443 | }
2444 | },
2445 | "type": "scatterternary"
2446 | }
2447 | ],
2448 | "surface": [
2449 | {
2450 | "colorbar": {
2451 | "outlinewidth": 0,
2452 | "ticks": ""
2453 | },
2454 | "type": "surface"
2455 | }
2456 | ],
2457 | "table": [
2458 | {
2459 | "cells": {
2460 | "fill": {
2461 | "color": "#EBF0F8"
2462 | },
2463 | "line": {
2464 | "color": "white"
2465 | }
2466 | },
2467 | "header": {
2468 | "fill": {
2469 | "color": "#C8D4E3"
2470 | },
2471 | "line": {
2472 | "color": "white"
2473 | }
2474 | },
2475 | "type": "table"
2476 | }
2477 | ]
2478 | },
2479 | "layout": {
2480 | "annotationdefaults": {
2481 | "arrowcolor": "#506784",
2482 | "arrowhead": 0,
2483 | "arrowwidth": 1
2484 | },
2485 | "colorscale": {
2486 | "diverging": [
2487 | [
2488 | 0,
2489 | "#8e0152"
2490 | ],
2491 | [
2492 | 0.1,
2493 | "#c51b7d"
2494 | ],
2495 | [
2496 | 0.2,
2497 | "#de77ae"
2498 | ],
2499 | [
2500 | 0.3,
2501 | "#f1b6da"
2502 | ],
2503 | [
2504 | 0.4,
2505 | "#fde0ef"
2506 | ],
2507 | [
2508 | 0.5,
2509 | "#f7f7f7"
2510 | ],
2511 | [
2512 | 0.6,
2513 | "#e6f5d0"
2514 | ],
2515 | [
2516 | 0.7,
2517 | "#b8e186"
2518 | ],
2519 | [
2520 | 0.8,
2521 | "#7fbc41"
2522 | ],
2523 | [
2524 | 0.9,
2525 | "#4d9221"
2526 | ],
2527 | [
2528 | 1,
2529 | "#276419"
2530 | ]
2531 | ],
2532 | "sequential": [
2533 | [
2534 | 0,
2535 | "#0508b8"
2536 | ],
2537 | [
2538 | 0.0893854748603352,
2539 | "#1910d8"
2540 | ],
2541 | [
2542 | 0.1787709497206704,
2543 | "#3c19f0"
2544 | ],
2545 | [
2546 | 0.2681564245810056,
2547 | "#6b1cfb"
2548 | ],
2549 | [
2550 | 0.3575418994413408,
2551 | "#981cfd"
2552 | ],
2553 | [
2554 | 0.44692737430167595,
2555 | "#bf1cfd"
2556 | ],
2557 | [
2558 | 0.5363128491620112,
2559 | "#dd2bfd"
2560 | ],
2561 | [
2562 | 0.6256983240223464,
2563 | "#f246fe"
2564 | ],
2565 | [
2566 | 0.7150837988826816,
2567 | "#fc67fd"
2568 | ],
2569 | [
2570 | 0.8044692737430168,
2571 | "#fe88fc"
2572 | ],
2573 | [
2574 | 0.8938547486033519,
2575 | "#fea5fd"
2576 | ],
2577 | [
2578 | 0.9832402234636871,
2579 | "#febefe"
2580 | ],
2581 | [
2582 | 1,
2583 | "#fec3fe"
2584 | ]
2585 | ],
2586 | "sequentialminus": [
2587 | [
2588 | 0,
2589 | "#0508b8"
2590 | ],
2591 | [
2592 | 0.0893854748603352,
2593 | "#1910d8"
2594 | ],
2595 | [
2596 | 0.1787709497206704,
2597 | "#3c19f0"
2598 | ],
2599 | [
2600 | 0.2681564245810056,
2601 | "#6b1cfb"
2602 | ],
2603 | [
2604 | 0.3575418994413408,
2605 | "#981cfd"
2606 | ],
2607 | [
2608 | 0.44692737430167595,
2609 | "#bf1cfd"
2610 | ],
2611 | [
2612 | 0.5363128491620112,
2613 | "#dd2bfd"
2614 | ],
2615 | [
2616 | 0.6256983240223464,
2617 | "#f246fe"
2618 | ],
2619 | [
2620 | 0.7150837988826816,
2621 | "#fc67fd"
2622 | ],
2623 | [
2624 | 0.8044692737430168,
2625 | "#fe88fc"
2626 | ],
2627 | [
2628 | 0.8938547486033519,
2629 | "#fea5fd"
2630 | ],
2631 | [
2632 | 0.9832402234636871,
2633 | "#febefe"
2634 | ],
2635 | [
2636 | 1,
2637 | "#fec3fe"
2638 | ]
2639 | ]
2640 | },
2641 | "colorway": [
2642 | "#636efa",
2643 | "#EF553B",
2644 | "#00cc96",
2645 | "#ab63fa",
2646 | "#19d3f3",
2647 | "#e763fa",
2648 | "#FECB52",
2649 | "#FFA15A",
2650 | "#FF6692",
2651 | "#B6E880"
2652 | ],
2653 | "font": {
2654 | "color": "#2a3f5f"
2655 | },
2656 | "geo": {
2657 | "bgcolor": "white",
2658 | "lakecolor": "white",
2659 | "landcolor": "#E5ECF6",
2660 | "showlakes": true,
2661 | "showland": true,
2662 | "subunitcolor": "white"
2663 | },
2664 | "hoverlabel": {
2665 | "align": "left"
2666 | },
2667 | "hovermode": "closest",
2668 | "mapbox": {
2669 | "style": "light"
2670 | },
2671 | "paper_bgcolor": "white",
2672 | "plot_bgcolor": "#E5ECF6",
2673 | "polar": {
2674 | "angularaxis": {
2675 | "gridcolor": "white",
2676 | "linecolor": "white",
2677 | "ticks": ""
2678 | },
2679 | "bgcolor": "#E5ECF6",
2680 | "radialaxis": {
2681 | "gridcolor": "white",
2682 | "linecolor": "white",
2683 | "ticks": ""
2684 | }
2685 | },
2686 | "scene": {
2687 | "xaxis": {
2688 | "backgroundcolor": "#E5ECF6",
2689 | "gridcolor": "white",
2690 | "gridwidth": 2,
2691 | "linecolor": "white",
2692 | "showbackground": true,
2693 | "ticks": "",
2694 | "zerolinecolor": "white"
2695 | },
2696 | "yaxis": {
2697 | "backgroundcolor": "#E5ECF6",
2698 | "gridcolor": "white",
2699 | "gridwidth": 2,
2700 | "linecolor": "white",
2701 | "showbackground": true,
2702 | "ticks": "",
2703 | "zerolinecolor": "white"
2704 | },
2705 | "zaxis": {
2706 | "backgroundcolor": "#E5ECF6",
2707 | "gridcolor": "white",
2708 | "gridwidth": 2,
2709 | "linecolor": "white",
2710 | "showbackground": true,
2711 | "ticks": "",
2712 | "zerolinecolor": "white"
2713 | }
2714 | },
2715 | "shapedefaults": {
2716 | "fillcolor": "#506784",
2717 | "line": {
2718 | "width": 0
2719 | },
2720 | "opacity": 0.4
2721 | },
2722 | "ternary": {
2723 | "aaxis": {
2724 | "gridcolor": "white",
2725 | "linecolor": "white",
2726 | "ticks": ""
2727 | },
2728 | "baxis": {
2729 | "gridcolor": "white",
2730 | "linecolor": "white",
2731 | "ticks": ""
2732 | },
2733 | "bgcolor": "#E5ECF6",
2734 | "caxis": {
2735 | "gridcolor": "white",
2736 | "linecolor": "white",
2737 | "ticks": ""
2738 | }
2739 | },
2740 | "title": {
2741 | "x": 0.05
2742 | },
2743 | "xaxis": {
2744 | "automargin": true,
2745 | "gridcolor": "white",
2746 | "linecolor": "white",
2747 | "ticks": "",
2748 | "zerolinecolor": "white",
2749 | "zerolinewidth": 2
2750 | },
2751 | "yaxis": {
2752 | "automargin": true,
2753 | "gridcolor": "white",
2754 | "linecolor": "white",
2755 | "ticks": "",
2756 | "zerolinecolor": "white",
2757 | "zerolinewidth": 2
2758 | }
2759 | }
2760 | },
2761 | "title": {
2762 | "text": "Sixes by IPL Batsmen"
2763 | },
2764 | "xaxis": {
2765 | "title": {
2766 | "text": "Player"
2767 | }
2768 | },
2769 | "yaxis": {
2770 | "title": {
2771 | "text": "Sixes"
2772 | }
2773 | }
2774 | }
2775 | },
2776 | "text/html": [
2777 | "\n",
2778 | " \n",
2779 | " \n",
2780 | "
\n",
2781 | " \n",
2820 | "
"
2821 | ]
2822 | },
2823 | "metadata": {},
2824 | "output_type": "display_data"
2825 | }
2826 | ],
2827 | "source": [
2828 | "px.bar(sixes_data, y = \"Sixes\",x = \"Player\", title = \"Sixes by IPL Batsmen\")"
2829 | ]
2830 | },
2831 | {
2832 | "cell_type": "code",
2833 | "execution_count": 254,
2834 | "metadata": {},
2835 | "outputs": [
2836 | {
2837 | "name": "stdout",
2838 | "output_type": "stream",
2839 | "text": [
2840 | "Wickets:\n"
2841 | ]
2842 | },
2843 | {
2844 | "data": {
2845 | "text/html": [
2846 | "\n",
2847 | "\n",
2860 | "
\n",
2861 | " \n",
2862 | " \n",
2863 | " | \n",
2864 | " id | \n",
2865 | " Player | \n",
2866 | " Mat | \n",
2867 | " Wkts | \n",
2868 | " Country | \n",
2869 | "
\n",
2870 | " \n",
2871 | " \n",
2872 | " \n",
2873 | " 0 | \n",
2874 | " 1 | \n",
2875 | " LasithMalinga | \n",
2876 | " 122 | \n",
2877 | " 170 | \n",
2878 | " SL | \n",
2879 | "
\n",
2880 | " \n",
2881 | " 1 | \n",
2882 | " 2 | \n",
2883 | " Amit Mishra | \n",
2884 | " 147 | \n",
2885 | " 157 | \n",
2886 | " Ind | \n",
2887 | "
\n",
2888 | " \n",
2889 | " 2 | \n",
2890 | " 3 | \n",
2891 | " Harbhajan Singh | \n",
2892 | " 160 | \n",
2893 | " 150 | \n",
2894 | " Ind | \n",
2895 | "
\n",
2896 | " \n",
2897 | " 3 | \n",
2898 | " 4 | \n",
2899 | " Piyush Chawla | \n",
2900 | " 157 | \n",
2901 | " 150 | \n",
2902 | " Ind | \n",
2903 | "
\n",
2904 | " \n",
2905 | " 4 | \n",
2906 | " 5 | \n",
2907 | " Dwayne Bravo | \n",
2908 | " 134 | \n",
2909 | " 147 | \n",
2910 | " WI | \n",
2911 | "
\n",
2912 | " \n",
2913 | "
\n",
2914 | "
"
2915 | ],
2916 | "text/plain": [
2917 | " id Player Mat Wkts Country\n",
2918 | "0 1 LasithMalinga 122 170 SL\n",
2919 | "1 2 Amit Mishra 147 157 Ind\n",
2920 | "2 3 Harbhajan Singh 160 150 Ind\n",
2921 | "3 4 Piyush Chawla 157 150 Ind\n",
2922 | "4 5 Dwayne Bravo 134 147 WI"
2923 | ]
2924 | },
2925 | "metadata": {},
2926 | "output_type": "display_data"
2927 | }
2928 | ],
2929 | "source": [
2930 | "print(\"Wickets:\")\n",
2931 | "display(wickets_data.head())"
2932 | ]
2933 | },
2934 | {
2935 | "cell_type": "code",
2936 | "execution_count": 255,
2937 | "metadata": {},
2938 | "outputs": [
2939 | {
2940 | "data": {
2941 | "application/vnd.plotly.v1+json": {
2942 | "config": {
2943 | "linkText": "Export to plot.ly",
2944 | "plotlyServerURL": "https://plot.ly",
2945 | "showLink": false
2946 | },
2947 | "data": [
2948 | {
2949 | "alignmentgroup": "True",
2950 | "hoverlabel": {
2951 | "namelength": 0
2952 | },
2953 | "hovertemplate": "Country=SL
Wkts=%{x}
Player=%{y}",
2954 | "legendgroup": "Country=SL",
2955 | "marker": {
2956 | "color": "#636efa"
2957 | },
2958 | "name": "Country=SL",
2959 | "offsetgroup": "Country=SL",
2960 | "orientation": "h",
2961 | "showlegend": true,
2962 | "textposition": "auto",
2963 | "type": "bar",
2964 | "uid": "564eeeb3-5d89-494f-a772-28d4c9300cd3",
2965 | "x": [
2966 | 170
2967 | ],
2968 | "xaxis": "x",
2969 | "y": [
2970 | "LasithMalinga"
2971 | ],
2972 | "yaxis": "y"
2973 | },
2974 | {
2975 | "alignmentgroup": "True",
2976 | "hoverlabel": {
2977 | "namelength": 0
2978 | },
2979 | "hovertemplate": "Country=Ind
Wkts=%{x}
Player=%{y}",
2980 | "legendgroup": "Country=Ind",
2981 | "marker": {
2982 | "color": "#EF553B"
2983 | },
2984 | "name": "Country=Ind",
2985 | "offsetgroup": "Country=Ind",
2986 | "orientation": "h",
2987 | "showlegend": true,
2988 | "textposition": "auto",
2989 | "type": "bar",
2990 | "uid": "c81b81f9-a6ff-4a74-8b55-3e93c132b053",
2991 | "x": [
2992 | 157,
2993 | 150,
2994 | 150,
2995 | 133,
2996 | 125,
2997 | 119,
2998 | 108,
2999 | 106,
3000 | 105,
3001 | 102,
3002 | 100,
3003 | 95,
3004 | 91,
3005 | 90,
3006 | 90,
3007 | 89,
3008 | 86,
3009 | 82,
3010 | 80,
3011 | 77,
3012 | 76,
3013 | 74
3014 | ],
3015 | "xaxis": "x",
3016 | "y": [
3017 | " Amit Mishra",
3018 | " Harbhajan Singh",
3019 | " Piyush Chawla",
3020 | " Bhuvneshwar Kumar",
3021 | " Ravichandran Ashwin",
3022 | " Umesh Yadav",
3023 | " Ravindra Jadeja",
3024 | " Ashish Nehra",
3025 | " Vinay Kumar",
3026 | " Zaheer Khan",
3027 | " Yuzvendra Chahal",
3028 | " Sandeep Sharma",
3029 | " Mohit Sharma",
3030 | " Praveen Kumar",
3031 | " RP Singh",
3032 | " Pragyan Ojha",
3033 | " Dhawal Kulkarni",
3034 | " Jasprit Bumrah",
3035 | " Irfan Pathan",
3036 | " Jaydev Unadkat",
3037 | " Lakshmipathy Balaji",
3038 | " Munaf Patel"
3039 | ],
3040 | "yaxis": "y"
3041 | },
3042 | {
3043 | "alignmentgroup": "True",
3044 | "hoverlabel": {
3045 | "namelength": 0
3046 | },
3047 | "hovertemplate": "Country=WI
Wkts=%{x}
Player=%{y}",
3048 | "legendgroup": "Country=WI",
3049 | "marker": {
3050 | "color": "#00cc96"
3051 | },
3052 | "name": "Country=WI",
3053 | "offsetgroup": "Country=WI",
3054 | "orientation": "h",
3055 | "showlegend": true,
3056 | "textposition": "auto",
3057 | "type": "bar",
3058 | "uid": "befa7a6f-79d3-4b24-8b36-df7b462dd952",
3059 | "x": [
3060 | 147,
3061 | 122
3062 | ],
3063 | "xaxis": "x",
3064 | "y": [
3065 | " Dwayne Bravo",
3066 | " Sunil Narine"
3067 | ],
3068 | "yaxis": "y"
3069 | },
3070 | {
3071 | "alignmentgroup": "True",
3072 | "hoverlabel": {
3073 | "namelength": 0
3074 | },
3075 | "hovertemplate": "Country=SA
Wkts=%{x}
Player=%{y}",
3076 | "legendgroup": "Country=SA",
3077 | "marker": {
3078 | "color": "#ab63fa"
3079 | },
3080 | "name": "Country=SA",
3081 | "offsetgroup": "Country=SA",
3082 | "orientation": "h",
3083 | "showlegend": true,
3084 | "textposition": "auto",
3085 | "type": "bar",
3086 | "uid": "5d1883df-9f53-4113-999f-8a423d0a8821",
3087 | "x": [
3088 | 96,
3089 | 85,
3090 | 79,
3091 | 77
3092 | ],
3093 | "xaxis": "x",
3094 | "y": [
3095 | " Dale Steyn",
3096 | " Albie Morkel",
3097 | " Imran Tahir",
3098 | " Morne Morkel"
3099 | ],
3100 | "yaxis": "y"
3101 | },
3102 | {
3103 | "alignmentgroup": "True",
3104 | "hoverlabel": {
3105 | "namelength": 0
3106 | },
3107 | "hovertemplate": "Country=Aus
Wkts=%{x}
Player=%{y}",
3108 | "legendgroup": "Country=Aus",
3109 | "marker": {
3110 | "color": "#19d3f3"
3111 | },
3112 | "name": "Country=Aus",
3113 | "offsetgroup": "Country=Aus",
3114 | "orientation": "h",
3115 | "showlegend": true,
3116 | "textposition": "auto",
3117 | "type": "bar",
3118 | "uid": "1ee7ec00-af7d-4247-a767-31b6518953e7",
3119 | "x": [
3120 | 92
3121 | ],
3122 | "xaxis": "x",
3123 | "y": [
3124 | " Shane Watson"
3125 | ],
3126 | "yaxis": "y"
3127 | }
3128 | ],
3129 | "layout": {
3130 | "barmode": "relative",
3131 | "grid": {
3132 | "xaxes": [
3133 | "x"
3134 | ],
3135 | "xgap": 0.1,
3136 | "xside": "bottom",
3137 | "yaxes": [
3138 | "y"
3139 | ],
3140 | "ygap": 0.1,
3141 | "yside": "left"
3142 | },
3143 | "height": 600,
3144 | "legend": {
3145 | "tracegroupgap": 0
3146 | },
3147 | "template": {
3148 | "data": {
3149 | "bar": [
3150 | {
3151 | "marker": {
3152 | "line": {
3153 | "color": "#E5ECF6",
3154 | "width": 0.5
3155 | }
3156 | },
3157 | "type": "bar"
3158 | }
3159 | ],
3160 | "barpolar": [
3161 | {
3162 | "marker": {
3163 | "line": {
3164 | "color": "#E5ECF6",
3165 | "width": 0.5
3166 | }
3167 | },
3168 | "type": "barpolar"
3169 | }
3170 | ],
3171 | "carpet": [
3172 | {
3173 | "aaxis": {
3174 | "endlinecolor": "#2a3f5f",
3175 | "gridcolor": "white",
3176 | "linecolor": "white",
3177 | "minorgridcolor": "white",
3178 | "startlinecolor": "#2a3f5f"
3179 | },
3180 | "baxis": {
3181 | "endlinecolor": "#2a3f5f",
3182 | "gridcolor": "white",
3183 | "linecolor": "white",
3184 | "minorgridcolor": "white",
3185 | "startlinecolor": "#2a3f5f"
3186 | },
3187 | "type": "carpet"
3188 | }
3189 | ],
3190 | "choropleth": [
3191 | {
3192 | "colorbar": {
3193 | "outlinewidth": 0,
3194 | "ticks": ""
3195 | },
3196 | "type": "choropleth"
3197 | }
3198 | ],
3199 | "contour": [
3200 | {
3201 | "colorbar": {
3202 | "outlinewidth": 0,
3203 | "ticks": ""
3204 | },
3205 | "colorscale": [
3206 | [
3207 | 0,
3208 | "#0508b8"
3209 | ],
3210 | [
3211 | 0.0893854748603352,
3212 | "#1910d8"
3213 | ],
3214 | [
3215 | 0.1787709497206704,
3216 | "#3c19f0"
3217 | ],
3218 | [
3219 | 0.2681564245810056,
3220 | "#6b1cfb"
3221 | ],
3222 | [
3223 | 0.3575418994413408,
3224 | "#981cfd"
3225 | ],
3226 | [
3227 | 0.44692737430167595,
3228 | "#bf1cfd"
3229 | ],
3230 | [
3231 | 0.5363128491620112,
3232 | "#dd2bfd"
3233 | ],
3234 | [
3235 | 0.6256983240223464,
3236 | "#f246fe"
3237 | ],
3238 | [
3239 | 0.7150837988826816,
3240 | "#fc67fd"
3241 | ],
3242 | [
3243 | 0.8044692737430168,
3244 | "#fe88fc"
3245 | ],
3246 | [
3247 | 0.8938547486033519,
3248 | "#fea5fd"
3249 | ],
3250 | [
3251 | 0.9832402234636871,
3252 | "#febefe"
3253 | ],
3254 | [
3255 | 1,
3256 | "#fec3fe"
3257 | ]
3258 | ],
3259 | "type": "contour"
3260 | }
3261 | ],
3262 | "contourcarpet": [
3263 | {
3264 | "colorbar": {
3265 | "outlinewidth": 0,
3266 | "ticks": ""
3267 | },
3268 | "type": "contourcarpet"
3269 | }
3270 | ],
3271 | "heatmap": [
3272 | {
3273 | "colorbar": {
3274 | "outlinewidth": 0,
3275 | "ticks": ""
3276 | },
3277 | "colorscale": [
3278 | [
3279 | 0,
3280 | "#0508b8"
3281 | ],
3282 | [
3283 | 0.0893854748603352,
3284 | "#1910d8"
3285 | ],
3286 | [
3287 | 0.1787709497206704,
3288 | "#3c19f0"
3289 | ],
3290 | [
3291 | 0.2681564245810056,
3292 | "#6b1cfb"
3293 | ],
3294 | [
3295 | 0.3575418994413408,
3296 | "#981cfd"
3297 | ],
3298 | [
3299 | 0.44692737430167595,
3300 | "#bf1cfd"
3301 | ],
3302 | [
3303 | 0.5363128491620112,
3304 | "#dd2bfd"
3305 | ],
3306 | [
3307 | 0.6256983240223464,
3308 | "#f246fe"
3309 | ],
3310 | [
3311 | 0.7150837988826816,
3312 | "#fc67fd"
3313 | ],
3314 | [
3315 | 0.8044692737430168,
3316 | "#fe88fc"
3317 | ],
3318 | [
3319 | 0.8938547486033519,
3320 | "#fea5fd"
3321 | ],
3322 | [
3323 | 0.9832402234636871,
3324 | "#febefe"
3325 | ],
3326 | [
3327 | 1,
3328 | "#fec3fe"
3329 | ]
3330 | ],
3331 | "type": "heatmap"
3332 | }
3333 | ],
3334 | "heatmapgl": [
3335 | {
3336 | "colorbar": {
3337 | "outlinewidth": 0,
3338 | "ticks": ""
3339 | },
3340 | "type": "heatmapgl"
3341 | }
3342 | ],
3343 | "histogram": [
3344 | {
3345 | "marker": {
3346 | "colorbar": {
3347 | "outlinewidth": 0,
3348 | "ticks": ""
3349 | }
3350 | },
3351 | "type": "histogram"
3352 | }
3353 | ],
3354 | "histogram2d": [
3355 | {
3356 | "colorbar": {
3357 | "outlinewidth": 0,
3358 | "ticks": ""
3359 | },
3360 | "colorscale": [
3361 | [
3362 | 0,
3363 | "#0508b8"
3364 | ],
3365 | [
3366 | 0.0893854748603352,
3367 | "#1910d8"
3368 | ],
3369 | [
3370 | 0.1787709497206704,
3371 | "#3c19f0"
3372 | ],
3373 | [
3374 | 0.2681564245810056,
3375 | "#6b1cfb"
3376 | ],
3377 | [
3378 | 0.3575418994413408,
3379 | "#981cfd"
3380 | ],
3381 | [
3382 | 0.44692737430167595,
3383 | "#bf1cfd"
3384 | ],
3385 | [
3386 | 0.5363128491620112,
3387 | "#dd2bfd"
3388 | ],
3389 | [
3390 | 0.6256983240223464,
3391 | "#f246fe"
3392 | ],
3393 | [
3394 | 0.7150837988826816,
3395 | "#fc67fd"
3396 | ],
3397 | [
3398 | 0.8044692737430168,
3399 | "#fe88fc"
3400 | ],
3401 | [
3402 | 0.8938547486033519,
3403 | "#fea5fd"
3404 | ],
3405 | [
3406 | 0.9832402234636871,
3407 | "#febefe"
3408 | ],
3409 | [
3410 | 1,
3411 | "#fec3fe"
3412 | ]
3413 | ],
3414 | "type": "histogram2d"
3415 | }
3416 | ],
3417 | "histogram2dcontour": [
3418 | {
3419 | "colorbar": {
3420 | "outlinewidth": 0,
3421 | "ticks": ""
3422 | },
3423 | "colorscale": [
3424 | [
3425 | 0,
3426 | "#0508b8"
3427 | ],
3428 | [
3429 | 0.0893854748603352,
3430 | "#1910d8"
3431 | ],
3432 | [
3433 | 0.1787709497206704,
3434 | "#3c19f0"
3435 | ],
3436 | [
3437 | 0.2681564245810056,
3438 | "#6b1cfb"
3439 | ],
3440 | [
3441 | 0.3575418994413408,
3442 | "#981cfd"
3443 | ],
3444 | [
3445 | 0.44692737430167595,
3446 | "#bf1cfd"
3447 | ],
3448 | [
3449 | 0.5363128491620112,
3450 | "#dd2bfd"
3451 | ],
3452 | [
3453 | 0.6256983240223464,
3454 | "#f246fe"
3455 | ],
3456 | [
3457 | 0.7150837988826816,
3458 | "#fc67fd"
3459 | ],
3460 | [
3461 | 0.8044692737430168,
3462 | "#fe88fc"
3463 | ],
3464 | [
3465 | 0.8938547486033519,
3466 | "#fea5fd"
3467 | ],
3468 | [
3469 | 0.9832402234636871,
3470 | "#febefe"
3471 | ],
3472 | [
3473 | 1,
3474 | "#fec3fe"
3475 | ]
3476 | ],
3477 | "type": "histogram2dcontour"
3478 | }
3479 | ],
3480 | "mesh3d": [
3481 | {
3482 | "colorbar": {
3483 | "outlinewidth": 0,
3484 | "ticks": ""
3485 | },
3486 | "type": "mesh3d"
3487 | }
3488 | ],
3489 | "parcoords": [
3490 | {
3491 | "line": {
3492 | "colorbar": {
3493 | "outlinewidth": 0,
3494 | "ticks": ""
3495 | }
3496 | },
3497 | "type": "parcoords"
3498 | }
3499 | ],
3500 | "scatter": [
3501 | {
3502 | "marker": {
3503 | "colorbar": {
3504 | "outlinewidth": 0,
3505 | "ticks": ""
3506 | }
3507 | },
3508 | "type": "scatter"
3509 | }
3510 | ],
3511 | "scatter3d": [
3512 | {
3513 | "marker": {
3514 | "colorbar": {
3515 | "outlinewidth": 0,
3516 | "ticks": ""
3517 | }
3518 | },
3519 | "type": "scatter3d"
3520 | }
3521 | ],
3522 | "scattercarpet": [
3523 | {
3524 | "marker": {
3525 | "colorbar": {
3526 | "outlinewidth": 0,
3527 | "ticks": ""
3528 | }
3529 | },
3530 | "type": "scattercarpet"
3531 | }
3532 | ],
3533 | "scattergeo": [
3534 | {
3535 | "marker": {
3536 | "colorbar": {
3537 | "outlinewidth": 0,
3538 | "ticks": ""
3539 | }
3540 | },
3541 | "type": "scattergeo"
3542 | }
3543 | ],
3544 | "scattergl": [
3545 | {
3546 | "marker": {
3547 | "colorbar": {
3548 | "outlinewidth": 0,
3549 | "ticks": ""
3550 | }
3551 | },
3552 | "type": "scattergl"
3553 | }
3554 | ],
3555 | "scattermapbox": [
3556 | {
3557 | "marker": {
3558 | "colorbar": {
3559 | "outlinewidth": 0,
3560 | "ticks": ""
3561 | }
3562 | },
3563 | "type": "scattermapbox"
3564 | }
3565 | ],
3566 | "scatterpolar": [
3567 | {
3568 | "marker": {
3569 | "colorbar": {
3570 | "outlinewidth": 0,
3571 | "ticks": ""
3572 | }
3573 | },
3574 | "type": "scatterpolar"
3575 | }
3576 | ],
3577 | "scatterpolargl": [
3578 | {
3579 | "marker": {
3580 | "colorbar": {
3581 | "outlinewidth": 0,
3582 | "ticks": ""
3583 | }
3584 | },
3585 | "type": "scatterpolargl"
3586 | }
3587 | ],
3588 | "scatterternary": [
3589 | {
3590 | "marker": {
3591 | "colorbar": {
3592 | "outlinewidth": 0,
3593 | "ticks": ""
3594 | }
3595 | },
3596 | "type": "scatterternary"
3597 | }
3598 | ],
3599 | "surface": [
3600 | {
3601 | "colorbar": {
3602 | "outlinewidth": 0,
3603 | "ticks": ""
3604 | },
3605 | "type": "surface"
3606 | }
3607 | ],
3608 | "table": [
3609 | {
3610 | "cells": {
3611 | "fill": {
3612 | "color": "#EBF0F8"
3613 | },
3614 | "line": {
3615 | "color": "white"
3616 | }
3617 | },
3618 | "header": {
3619 | "fill": {
3620 | "color": "#C8D4E3"
3621 | },
3622 | "line": {
3623 | "color": "white"
3624 | }
3625 | },
3626 | "type": "table"
3627 | }
3628 | ]
3629 | },
3630 | "layout": {
3631 | "annotationdefaults": {
3632 | "arrowcolor": "#506784",
3633 | "arrowhead": 0,
3634 | "arrowwidth": 1
3635 | },
3636 | "colorscale": {
3637 | "diverging": [
3638 | [
3639 | 0,
3640 | "#8e0152"
3641 | ],
3642 | [
3643 | 0.1,
3644 | "#c51b7d"
3645 | ],
3646 | [
3647 | 0.2,
3648 | "#de77ae"
3649 | ],
3650 | [
3651 | 0.3,
3652 | "#f1b6da"
3653 | ],
3654 | [
3655 | 0.4,
3656 | "#fde0ef"
3657 | ],
3658 | [
3659 | 0.5,
3660 | "#f7f7f7"
3661 | ],
3662 | [
3663 | 0.6,
3664 | "#e6f5d0"
3665 | ],
3666 | [
3667 | 0.7,
3668 | "#b8e186"
3669 | ],
3670 | [
3671 | 0.8,
3672 | "#7fbc41"
3673 | ],
3674 | [
3675 | 0.9,
3676 | "#4d9221"
3677 | ],
3678 | [
3679 | 1,
3680 | "#276419"
3681 | ]
3682 | ],
3683 | "sequential": [
3684 | [
3685 | 0,
3686 | "#0508b8"
3687 | ],
3688 | [
3689 | 0.0893854748603352,
3690 | "#1910d8"
3691 | ],
3692 | [
3693 | 0.1787709497206704,
3694 | "#3c19f0"
3695 | ],
3696 | [
3697 | 0.2681564245810056,
3698 | "#6b1cfb"
3699 | ],
3700 | [
3701 | 0.3575418994413408,
3702 | "#981cfd"
3703 | ],
3704 | [
3705 | 0.44692737430167595,
3706 | "#bf1cfd"
3707 | ],
3708 | [
3709 | 0.5363128491620112,
3710 | "#dd2bfd"
3711 | ],
3712 | [
3713 | 0.6256983240223464,
3714 | "#f246fe"
3715 | ],
3716 | [
3717 | 0.7150837988826816,
3718 | "#fc67fd"
3719 | ],
3720 | [
3721 | 0.8044692737430168,
3722 | "#fe88fc"
3723 | ],
3724 | [
3725 | 0.8938547486033519,
3726 | "#fea5fd"
3727 | ],
3728 | [
3729 | 0.9832402234636871,
3730 | "#febefe"
3731 | ],
3732 | [
3733 | 1,
3734 | "#fec3fe"
3735 | ]
3736 | ],
3737 | "sequentialminus": [
3738 | [
3739 | 0,
3740 | "#0508b8"
3741 | ],
3742 | [
3743 | 0.0893854748603352,
3744 | "#1910d8"
3745 | ],
3746 | [
3747 | 0.1787709497206704,
3748 | "#3c19f0"
3749 | ],
3750 | [
3751 | 0.2681564245810056,
3752 | "#6b1cfb"
3753 | ],
3754 | [
3755 | 0.3575418994413408,
3756 | "#981cfd"
3757 | ],
3758 | [
3759 | 0.44692737430167595,
3760 | "#bf1cfd"
3761 | ],
3762 | [
3763 | 0.5363128491620112,
3764 | "#dd2bfd"
3765 | ],
3766 | [
3767 | 0.6256983240223464,
3768 | "#f246fe"
3769 | ],
3770 | [
3771 | 0.7150837988826816,
3772 | "#fc67fd"
3773 | ],
3774 | [
3775 | 0.8044692737430168,
3776 | "#fe88fc"
3777 | ],
3778 | [
3779 | 0.8938547486033519,
3780 | "#fea5fd"
3781 | ],
3782 | [
3783 | 0.9832402234636871,
3784 | "#febefe"
3785 | ],
3786 | [
3787 | 1,
3788 | "#fec3fe"
3789 | ]
3790 | ]
3791 | },
3792 | "colorway": [
3793 | "#636efa",
3794 | "#EF553B",
3795 | "#00cc96",
3796 | "#ab63fa",
3797 | "#19d3f3",
3798 | "#e763fa",
3799 | "#FECB52",
3800 | "#FFA15A",
3801 | "#FF6692",
3802 | "#B6E880"
3803 | ],
3804 | "font": {
3805 | "color": "#2a3f5f"
3806 | },
3807 | "geo": {
3808 | "bgcolor": "white",
3809 | "lakecolor": "white",
3810 | "landcolor": "#E5ECF6",
3811 | "showlakes": true,
3812 | "showland": true,
3813 | "subunitcolor": "white"
3814 | },
3815 | "hoverlabel": {
3816 | "align": "left"
3817 | },
3818 | "hovermode": "closest",
3819 | "mapbox": {
3820 | "style": "light"
3821 | },
3822 | "paper_bgcolor": "white",
3823 | "plot_bgcolor": "#E5ECF6",
3824 | "polar": {
3825 | "angularaxis": {
3826 | "gridcolor": "white",
3827 | "linecolor": "white",
3828 | "ticks": ""
3829 | },
3830 | "bgcolor": "#E5ECF6",
3831 | "radialaxis": {
3832 | "gridcolor": "white",
3833 | "linecolor": "white",
3834 | "ticks": ""
3835 | }
3836 | },
3837 | "scene": {
3838 | "xaxis": {
3839 | "backgroundcolor": "#E5ECF6",
3840 | "gridcolor": "white",
3841 | "gridwidth": 2,
3842 | "linecolor": "white",
3843 | "showbackground": true,
3844 | "ticks": "",
3845 | "zerolinecolor": "white"
3846 | },
3847 | "yaxis": {
3848 | "backgroundcolor": "#E5ECF6",
3849 | "gridcolor": "white",
3850 | "gridwidth": 2,
3851 | "linecolor": "white",
3852 | "showbackground": true,
3853 | "ticks": "",
3854 | "zerolinecolor": "white"
3855 | },
3856 | "zaxis": {
3857 | "backgroundcolor": "#E5ECF6",
3858 | "gridcolor": "white",
3859 | "gridwidth": 2,
3860 | "linecolor": "white",
3861 | "showbackground": true,
3862 | "ticks": "",
3863 | "zerolinecolor": "white"
3864 | }
3865 | },
3866 | "shapedefaults": {
3867 | "fillcolor": "#506784",
3868 | "line": {
3869 | "width": 0
3870 | },
3871 | "opacity": 0.4
3872 | },
3873 | "ternary": {
3874 | "aaxis": {
3875 | "gridcolor": "white",
3876 | "linecolor": "white",
3877 | "ticks": ""
3878 | },
3879 | "baxis": {
3880 | "gridcolor": "white",
3881 | "linecolor": "white",
3882 | "ticks": ""
3883 | },
3884 | "bgcolor": "#E5ECF6",
3885 | "caxis": {
3886 | "gridcolor": "white",
3887 | "linecolor": "white",
3888 | "ticks": ""
3889 | }
3890 | },
3891 | "title": {
3892 | "x": 0.05
3893 | },
3894 | "xaxis": {
3895 | "automargin": true,
3896 | "gridcolor": "white",
3897 | "linecolor": "white",
3898 | "ticks": "",
3899 | "zerolinecolor": "white",
3900 | "zerolinewidth": 2
3901 | },
3902 | "yaxis": {
3903 | "automargin": true,
3904 | "gridcolor": "white",
3905 | "linecolor": "white",
3906 | "ticks": "",
3907 | "zerolinecolor": "white",
3908 | "zerolinewidth": 2
3909 | }
3910 | }
3911 | },
3912 | "title": {
3913 | "text": "Sixes by IPL Batsmen"
3914 | },
3915 | "xaxis": {
3916 | "title": {
3917 | "text": "Wkts"
3918 | }
3919 | },
3920 | "yaxis": {
3921 | "title": {
3922 | "text": "Player"
3923 | }
3924 | }
3925 | }
3926 | },
3927 | "text/html": [
3928 | "\n",
3929 | " \n",
3930 | " \n",
3931 | "
\n",
3932 | " \n",
3971 | "
"
3972 | ]
3973 | },
3974 | "metadata": {},
3975 | "output_type": "display_data"
3976 | }
3977 | ],
3978 | "source": [
3979 | "px.bar(wickets_data, x = \"Wkts\",y = \"Player\", color = \"Country\", title = \"Sixes by IPL Batsmen\", orientation = \"h\")"
3980 | ]
3981 | },
3982 | {
3983 | "cell_type": "code",
3984 | "execution_count": 256,
3985 | "metadata": {},
3986 | "outputs": [
3987 | {
3988 | "data": {
3989 | "text/html": [
3990 | "\n",
3991 | "\n",
4004 | "
\n",
4005 | " \n",
4006 | " \n",
4007 | " | \n",
4008 | " POS | \n",
4009 | " PLAYER | \n",
4010 | " HS | \n",
4011 | " BF | \n",
4012 | " 4s | \n",
4013 | " 6s | \n",
4014 | " NO | \n",
4015 | "
\n",
4016 | " \n",
4017 | " \n",
4018 | " \n",
4019 | " 0 | \n",
4020 | " 1 | \n",
4021 | " ChrisGayle | \n",
4022 | " 175 | \n",
4023 | " 66 | \n",
4024 | " 13 | \n",
4025 | " 17 | \n",
4026 | " Y | \n",
4027 | "
\n",
4028 | " \n",
4029 | " 1 | \n",
4030 | " 2 | \n",
4031 | " Brendon McCullum | \n",
4032 | " 158 | \n",
4033 | " 73 | \n",
4034 | " 10 | \n",
4035 | " 13 | \n",
4036 | " Y | \n",
4037 | "
\n",
4038 | " \n",
4039 | " 2 | \n",
4040 | " 3 | \n",
4041 | " AB de Villiers | \n",
4042 | " 133 | \n",
4043 | " 59 | \n",
4044 | " 19 | \n",
4045 | " 4 | \n",
4046 | " Y | \n",
4047 | "
\n",
4048 | " \n",
4049 | " 3 | \n",
4050 | " 4 | \n",
4051 | " AB de Villiers | \n",
4052 | " 129 | \n",
4053 | " 52 | \n",
4054 | " 10 | \n",
4055 | " 12 | \n",
4056 | " Y | \n",
4057 | "
\n",
4058 | " \n",
4059 | "
\n",
4060 | "
"
4061 | ],
4062 | "text/plain": [
4063 | " POS PLAYER HS BF 4s 6s NO\n",
4064 | "0 1 ChrisGayle 175 66 13 17 Y\n",
4065 | "1 2 Brendon McCullum 158 73 10 13 Y\n",
4066 | "2 3 AB de Villiers 133 59 19 4 Y\n",
4067 | "3 4 AB de Villiers 129 52 10 12 Y"
4068 | ]
4069 | },
4070 | "execution_count": 256,
4071 | "metadata": {},
4072 | "output_type": "execute_result"
4073 | }
4074 | ],
4075 | "source": [
4076 | "\n",
4077 | "high_score_in=pd.read_csv(\"Desktop/ipl_data/high_score_in.csv\")\n",
4078 | "high_score_in.head(4)"
4079 | ]
4080 | },
4081 | {
4082 | "cell_type": "code",
4083 | "execution_count": 257,
4084 | "metadata": {},
4085 | "outputs": [
4086 | {
4087 | "data": {
4088 | "application/vnd.plotly.v1+json": {
4089 | "config": {
4090 | "linkText": "Export to plot.ly",
4091 | "plotlyServerURL": "https://plot.ly",
4092 | "showLink": false
4093 | },
4094 | "data": [
4095 | {
4096 | "hoverlabel": {
4097 | "namelength": 0
4098 | },
4099 | "hovertemplate": "PLAYER=%{x}
HS=%{marker.size}",
4100 | "legendgroup": "PLAYER=ChrisGayle",
4101 | "marker": {
4102 | "color": "#636efa",
4103 | "size": [
4104 | 175
4105 | ],
4106 | "sizemode": "area",
4107 | "sizeref": 0.0175,
4108 | "symbol": "circle"
4109 | },
4110 | "mode": "markers",
4111 | "name": "PLAYER=ChrisGayle",
4112 | "showlegend": true,
4113 | "type": "scatter",
4114 | "uid": "c0e5e8c7-3315-4cdb-b300-7db9d3295a6a",
4115 | "x": [
4116 | "ChrisGayle"
4117 | ],
4118 | "xaxis": "x",
4119 | "y": [
4120 | 175
4121 | ],
4122 | "yaxis": "y"
4123 | },
4124 | {
4125 | "hoverlabel": {
4126 | "namelength": 0
4127 | },
4128 | "hovertemplate": "PLAYER=%{x}
HS=%{marker.size}",
4129 | "legendgroup": "PLAYER= Brendon McCullum",
4130 | "marker": {
4131 | "color": "#EF553B",
4132 | "size": [
4133 | 158
4134 | ],
4135 | "sizemode": "area",
4136 | "sizeref": 0.0175,
4137 | "symbol": "circle"
4138 | },
4139 | "mode": "markers",
4140 | "name": "PLAYER= Brendon McCullum",
4141 | "showlegend": true,
4142 | "type": "scatter",
4143 | "uid": "eda0bb69-25cd-4583-a2a2-f562eeffca70",
4144 | "x": [
4145 | " Brendon McCullum"
4146 | ],
4147 | "xaxis": "x",
4148 | "y": [
4149 | 158
4150 | ],
4151 | "yaxis": "y"
4152 | },
4153 | {
4154 | "hoverlabel": {
4155 | "namelength": 0
4156 | },
4157 | "hovertemplate": "PLAYER=%{x}
HS=%{marker.size}",
4158 | "legendgroup": "PLAYER= AB de Villiers",
4159 | "marker": {
4160 | "color": "#00cc96",
4161 | "size": [
4162 | 133,
4163 | 129
4164 | ],
4165 | "sizemode": "area",
4166 | "sizeref": 0.0175,
4167 | "symbol": "circle"
4168 | },
4169 | "mode": "markers",
4170 | "name": "PLAYER= AB de Villiers",
4171 | "showlegend": true,
4172 | "type": "scatter",
4173 | "uid": "90bed609-e14b-4b23-9931-2d0e4044d253",
4174 | "x": [
4175 | " AB de Villiers",
4176 | " AB de Villiers"
4177 | ],
4178 | "xaxis": "x",
4179 | "y": [
4180 | 133,
4181 | 129
4182 | ],
4183 | "yaxis": "y"
4184 | },
4185 | {
4186 | "hoverlabel": {
4187 | "namelength": 0
4188 | },
4189 | "hovertemplate": "PLAYER=%{x}
HS=%{marker.size}",
4190 | "legendgroup": "PLAYER= Chris Gayle",
4191 | "marker": {
4192 | "color": "#ab63fa",
4193 | "size": [
4194 | 128
4195 | ],
4196 | "sizemode": "area",
4197 | "sizeref": 0.0175,
4198 | "symbol": "circle"
4199 | },
4200 | "mode": "markers",
4201 | "name": "PLAYER= Chris Gayle",
4202 | "showlegend": true,
4203 | "type": "scatter",
4204 | "uid": "0d2b844d-84e8-4bb7-99eb-f5e751eaa936",
4205 | "x": [
4206 | " Chris Gayle"
4207 | ],
4208 | "xaxis": "x",
4209 | "y": [
4210 | 128
4211 | ],
4212 | "yaxis": "y"
4213 | },
4214 | {
4215 | "hoverlabel": {
4216 | "namelength": 0
4217 | },
4218 | "hovertemplate": "PLAYER=%{x}
HS=%{marker.size}",
4219 | "legendgroup": "PLAYER= Rishabh Pant",
4220 | "marker": {
4221 | "color": "#19d3f3",
4222 | "size": [
4223 | 128
4224 | ],
4225 | "sizemode": "area",
4226 | "sizeref": 0.0175,
4227 | "symbol": "circle"
4228 | },
4229 | "mode": "markers",
4230 | "name": "PLAYER= Rishabh Pant",
4231 | "showlegend": true,
4232 | "type": "scatter",
4233 | "uid": "ea6710b1-6aeb-48b7-96bc-2c5a39a43e4f",
4234 | "x": [
4235 | " Rishabh Pant"
4236 | ],
4237 | "xaxis": "x",
4238 | "y": [
4239 | 128
4240 | ],
4241 | "yaxis": "y"
4242 | },
4243 | {
4244 | "hoverlabel": {
4245 | "namelength": 0
4246 | },
4247 | "hovertemplate": "PLAYER=%{x}
HS=%{marker.size}",
4248 | "legendgroup": "PLAYER= Murali Vijay",
4249 | "marker": {
4250 | "color": "#e763fa",
4251 | "size": [
4252 | 127
4253 | ],
4254 | "sizemode": "area",
4255 | "sizeref": 0.0175,
4256 | "symbol": "circle"
4257 | },
4258 | "mode": "markers",
4259 | "name": "PLAYER= Murali Vijay",
4260 | "showlegend": true,
4261 | "type": "scatter",
4262 | "uid": "cc2eeebf-61a3-45ef-87de-5daf6d946605",
4263 | "x": [
4264 | " Murali Vijay"
4265 | ],
4266 | "xaxis": "x",
4267 | "y": [
4268 | 127
4269 | ],
4270 | "yaxis": "y"
4271 | },
4272 | {
4273 | "hoverlabel": {
4274 | "namelength": 0
4275 | },
4276 | "hovertemplate": "PLAYER=%{x}
HS=%{marker.size}",
4277 | "legendgroup": "PLAYER= David Warner",
4278 | "marker": {
4279 | "color": "#FECB52",
4280 | "size": [
4281 | 126
4282 | ],
4283 | "sizemode": "area",
4284 | "sizeref": 0.0175,
4285 | "symbol": "circle"
4286 | },
4287 | "mode": "markers",
4288 | "name": "PLAYER= David Warner",
4289 | "showlegend": true,
4290 | "type": "scatter",
4291 | "uid": "7b0b7377-2e41-4bf7-9e3c-6a6b73abefbf",
4292 | "x": [
4293 | " David Warner"
4294 | ],
4295 | "xaxis": "x",
4296 | "y": [
4297 | 126
4298 | ],
4299 | "yaxis": "y"
4300 | },
4301 | {
4302 | "hoverlabel": {
4303 | "namelength": 0
4304 | },
4305 | "hovertemplate": "PLAYER=%{x}
HS=%{marker.size}",
4306 | "legendgroup": "PLAYER= Virender Sehwag",
4307 | "marker": {
4308 | "color": "#FFA15A",
4309 | "size": [
4310 | 122
4311 | ],
4312 | "sizemode": "area",
4313 | "sizeref": 0.0175,
4314 | "symbol": "circle"
4315 | },
4316 | "mode": "markers",
4317 | "name": "PLAYER= Virender Sehwag",
4318 | "showlegend": true,
4319 | "type": "scatter",
4320 | "uid": "2f2b14dc-1c70-40ae-81bc-adf19f2122cb",
4321 | "x": [
4322 | " Virender Sehwag"
4323 | ],
4324 | "xaxis": "x",
4325 | "y": [
4326 | 122
4327 | ],
4328 | "yaxis": "y"
4329 | }
4330 | ],
4331 | "layout": {
4332 | "grid": {
4333 | "xaxes": [
4334 | "x"
4335 | ],
4336 | "xgap": 0.1,
4337 | "xside": "bottom",
4338 | "yaxes": [
4339 | "y"
4340 | ],
4341 | "ygap": 0.1,
4342 | "yside": "left"
4343 | },
4344 | "height": 600,
4345 | "legend": {
4346 | "itemsizing": "constant",
4347 | "tracegroupgap": 0
4348 | },
4349 | "margin": {
4350 | "t": 60
4351 | },
4352 | "template": {
4353 | "data": {
4354 | "bar": [
4355 | {
4356 | "marker": {
4357 | "line": {
4358 | "color": "#E5ECF6",
4359 | "width": 0.5
4360 | }
4361 | },
4362 | "type": "bar"
4363 | }
4364 | ],
4365 | "barpolar": [
4366 | {
4367 | "marker": {
4368 | "line": {
4369 | "color": "#E5ECF6",
4370 | "width": 0.5
4371 | }
4372 | },
4373 | "type": "barpolar"
4374 | }
4375 | ],
4376 | "carpet": [
4377 | {
4378 | "aaxis": {
4379 | "endlinecolor": "#2a3f5f",
4380 | "gridcolor": "white",
4381 | "linecolor": "white",
4382 | "minorgridcolor": "white",
4383 | "startlinecolor": "#2a3f5f"
4384 | },
4385 | "baxis": {
4386 | "endlinecolor": "#2a3f5f",
4387 | "gridcolor": "white",
4388 | "linecolor": "white",
4389 | "minorgridcolor": "white",
4390 | "startlinecolor": "#2a3f5f"
4391 | },
4392 | "type": "carpet"
4393 | }
4394 | ],
4395 | "choropleth": [
4396 | {
4397 | "colorbar": {
4398 | "outlinewidth": 0,
4399 | "ticks": ""
4400 | },
4401 | "type": "choropleth"
4402 | }
4403 | ],
4404 | "contour": [
4405 | {
4406 | "colorbar": {
4407 | "outlinewidth": 0,
4408 | "ticks": ""
4409 | },
4410 | "colorscale": [
4411 | [
4412 | 0,
4413 | "#0508b8"
4414 | ],
4415 | [
4416 | 0.0893854748603352,
4417 | "#1910d8"
4418 | ],
4419 | [
4420 | 0.1787709497206704,
4421 | "#3c19f0"
4422 | ],
4423 | [
4424 | 0.2681564245810056,
4425 | "#6b1cfb"
4426 | ],
4427 | [
4428 | 0.3575418994413408,
4429 | "#981cfd"
4430 | ],
4431 | [
4432 | 0.44692737430167595,
4433 | "#bf1cfd"
4434 | ],
4435 | [
4436 | 0.5363128491620112,
4437 | "#dd2bfd"
4438 | ],
4439 | [
4440 | 0.6256983240223464,
4441 | "#f246fe"
4442 | ],
4443 | [
4444 | 0.7150837988826816,
4445 | "#fc67fd"
4446 | ],
4447 | [
4448 | 0.8044692737430168,
4449 | "#fe88fc"
4450 | ],
4451 | [
4452 | 0.8938547486033519,
4453 | "#fea5fd"
4454 | ],
4455 | [
4456 | 0.9832402234636871,
4457 | "#febefe"
4458 | ],
4459 | [
4460 | 1,
4461 | "#fec3fe"
4462 | ]
4463 | ],
4464 | "type": "contour"
4465 | }
4466 | ],
4467 | "contourcarpet": [
4468 | {
4469 | "colorbar": {
4470 | "outlinewidth": 0,
4471 | "ticks": ""
4472 | },
4473 | "type": "contourcarpet"
4474 | }
4475 | ],
4476 | "heatmap": [
4477 | {
4478 | "colorbar": {
4479 | "outlinewidth": 0,
4480 | "ticks": ""
4481 | },
4482 | "colorscale": [
4483 | [
4484 | 0,
4485 | "#0508b8"
4486 | ],
4487 | [
4488 | 0.0893854748603352,
4489 | "#1910d8"
4490 | ],
4491 | [
4492 | 0.1787709497206704,
4493 | "#3c19f0"
4494 | ],
4495 | [
4496 | 0.2681564245810056,
4497 | "#6b1cfb"
4498 | ],
4499 | [
4500 | 0.3575418994413408,
4501 | "#981cfd"
4502 | ],
4503 | [
4504 | 0.44692737430167595,
4505 | "#bf1cfd"
4506 | ],
4507 | [
4508 | 0.5363128491620112,
4509 | "#dd2bfd"
4510 | ],
4511 | [
4512 | 0.6256983240223464,
4513 | "#f246fe"
4514 | ],
4515 | [
4516 | 0.7150837988826816,
4517 | "#fc67fd"
4518 | ],
4519 | [
4520 | 0.8044692737430168,
4521 | "#fe88fc"
4522 | ],
4523 | [
4524 | 0.8938547486033519,
4525 | "#fea5fd"
4526 | ],
4527 | [
4528 | 0.9832402234636871,
4529 | "#febefe"
4530 | ],
4531 | [
4532 | 1,
4533 | "#fec3fe"
4534 | ]
4535 | ],
4536 | "type": "heatmap"
4537 | }
4538 | ],
4539 | "heatmapgl": [
4540 | {
4541 | "colorbar": {
4542 | "outlinewidth": 0,
4543 | "ticks": ""
4544 | },
4545 | "type": "heatmapgl"
4546 | }
4547 | ],
4548 | "histogram": [
4549 | {
4550 | "marker": {
4551 | "colorbar": {
4552 | "outlinewidth": 0,
4553 | "ticks": ""
4554 | }
4555 | },
4556 | "type": "histogram"
4557 | }
4558 | ],
4559 | "histogram2d": [
4560 | {
4561 | "colorbar": {
4562 | "outlinewidth": 0,
4563 | "ticks": ""
4564 | },
4565 | "colorscale": [
4566 | [
4567 | 0,
4568 | "#0508b8"
4569 | ],
4570 | [
4571 | 0.0893854748603352,
4572 | "#1910d8"
4573 | ],
4574 | [
4575 | 0.1787709497206704,
4576 | "#3c19f0"
4577 | ],
4578 | [
4579 | 0.2681564245810056,
4580 | "#6b1cfb"
4581 | ],
4582 | [
4583 | 0.3575418994413408,
4584 | "#981cfd"
4585 | ],
4586 | [
4587 | 0.44692737430167595,
4588 | "#bf1cfd"
4589 | ],
4590 | [
4591 | 0.5363128491620112,
4592 | "#dd2bfd"
4593 | ],
4594 | [
4595 | 0.6256983240223464,
4596 | "#f246fe"
4597 | ],
4598 | [
4599 | 0.7150837988826816,
4600 | "#fc67fd"
4601 | ],
4602 | [
4603 | 0.8044692737430168,
4604 | "#fe88fc"
4605 | ],
4606 | [
4607 | 0.8938547486033519,
4608 | "#fea5fd"
4609 | ],
4610 | [
4611 | 0.9832402234636871,
4612 | "#febefe"
4613 | ],
4614 | [
4615 | 1,
4616 | "#fec3fe"
4617 | ]
4618 | ],
4619 | "type": "histogram2d"
4620 | }
4621 | ],
4622 | "histogram2dcontour": [
4623 | {
4624 | "colorbar": {
4625 | "outlinewidth": 0,
4626 | "ticks": ""
4627 | },
4628 | "colorscale": [
4629 | [
4630 | 0,
4631 | "#0508b8"
4632 | ],
4633 | [
4634 | 0.0893854748603352,
4635 | "#1910d8"
4636 | ],
4637 | [
4638 | 0.1787709497206704,
4639 | "#3c19f0"
4640 | ],
4641 | [
4642 | 0.2681564245810056,
4643 | "#6b1cfb"
4644 | ],
4645 | [
4646 | 0.3575418994413408,
4647 | "#981cfd"
4648 | ],
4649 | [
4650 | 0.44692737430167595,
4651 | "#bf1cfd"
4652 | ],
4653 | [
4654 | 0.5363128491620112,
4655 | "#dd2bfd"
4656 | ],
4657 | [
4658 | 0.6256983240223464,
4659 | "#f246fe"
4660 | ],
4661 | [
4662 | 0.7150837988826816,
4663 | "#fc67fd"
4664 | ],
4665 | [
4666 | 0.8044692737430168,
4667 | "#fe88fc"
4668 | ],
4669 | [
4670 | 0.8938547486033519,
4671 | "#fea5fd"
4672 | ],
4673 | [
4674 | 0.9832402234636871,
4675 | "#febefe"
4676 | ],
4677 | [
4678 | 1,
4679 | "#fec3fe"
4680 | ]
4681 | ],
4682 | "type": "histogram2dcontour"
4683 | }
4684 | ],
4685 | "mesh3d": [
4686 | {
4687 | "colorbar": {
4688 | "outlinewidth": 0,
4689 | "ticks": ""
4690 | },
4691 | "type": "mesh3d"
4692 | }
4693 | ],
4694 | "parcoords": [
4695 | {
4696 | "line": {
4697 | "colorbar": {
4698 | "outlinewidth": 0,
4699 | "ticks": ""
4700 | }
4701 | },
4702 | "type": "parcoords"
4703 | }
4704 | ],
4705 | "scatter": [
4706 | {
4707 | "marker": {
4708 | "colorbar": {
4709 | "outlinewidth": 0,
4710 | "ticks": ""
4711 | }
4712 | },
4713 | "type": "scatter"
4714 | }
4715 | ],
4716 | "scatter3d": [
4717 | {
4718 | "marker": {
4719 | "colorbar": {
4720 | "outlinewidth": 0,
4721 | "ticks": ""
4722 | }
4723 | },
4724 | "type": "scatter3d"
4725 | }
4726 | ],
4727 | "scattercarpet": [
4728 | {
4729 | "marker": {
4730 | "colorbar": {
4731 | "outlinewidth": 0,
4732 | "ticks": ""
4733 | }
4734 | },
4735 | "type": "scattercarpet"
4736 | }
4737 | ],
4738 | "scattergeo": [
4739 | {
4740 | "marker": {
4741 | "colorbar": {
4742 | "outlinewidth": 0,
4743 | "ticks": ""
4744 | }
4745 | },
4746 | "type": "scattergeo"
4747 | }
4748 | ],
4749 | "scattergl": [
4750 | {
4751 | "marker": {
4752 | "colorbar": {
4753 | "outlinewidth": 0,
4754 | "ticks": ""
4755 | }
4756 | },
4757 | "type": "scattergl"
4758 | }
4759 | ],
4760 | "scattermapbox": [
4761 | {
4762 | "marker": {
4763 | "colorbar": {
4764 | "outlinewidth": 0,
4765 | "ticks": ""
4766 | }
4767 | },
4768 | "type": "scattermapbox"
4769 | }
4770 | ],
4771 | "scatterpolar": [
4772 | {
4773 | "marker": {
4774 | "colorbar": {
4775 | "outlinewidth": 0,
4776 | "ticks": ""
4777 | }
4778 | },
4779 | "type": "scatterpolar"
4780 | }
4781 | ],
4782 | "scatterpolargl": [
4783 | {
4784 | "marker": {
4785 | "colorbar": {
4786 | "outlinewidth": 0,
4787 | "ticks": ""
4788 | }
4789 | },
4790 | "type": "scatterpolargl"
4791 | }
4792 | ],
4793 | "scatterternary": [
4794 | {
4795 | "marker": {
4796 | "colorbar": {
4797 | "outlinewidth": 0,
4798 | "ticks": ""
4799 | }
4800 | },
4801 | "type": "scatterternary"
4802 | }
4803 | ],
4804 | "surface": [
4805 | {
4806 | "colorbar": {
4807 | "outlinewidth": 0,
4808 | "ticks": ""
4809 | },
4810 | "type": "surface"
4811 | }
4812 | ],
4813 | "table": [
4814 | {
4815 | "cells": {
4816 | "fill": {
4817 | "color": "#EBF0F8"
4818 | },
4819 | "line": {
4820 | "color": "white"
4821 | }
4822 | },
4823 | "header": {
4824 | "fill": {
4825 | "color": "#C8D4E3"
4826 | },
4827 | "line": {
4828 | "color": "white"
4829 | }
4830 | },
4831 | "type": "table"
4832 | }
4833 | ]
4834 | },
4835 | "layout": {
4836 | "annotationdefaults": {
4837 | "arrowcolor": "#506784",
4838 | "arrowhead": 0,
4839 | "arrowwidth": 1
4840 | },
4841 | "colorscale": {
4842 | "diverging": [
4843 | [
4844 | 0,
4845 | "#8e0152"
4846 | ],
4847 | [
4848 | 0.1,
4849 | "#c51b7d"
4850 | ],
4851 | [
4852 | 0.2,
4853 | "#de77ae"
4854 | ],
4855 | [
4856 | 0.3,
4857 | "#f1b6da"
4858 | ],
4859 | [
4860 | 0.4,
4861 | "#fde0ef"
4862 | ],
4863 | [
4864 | 0.5,
4865 | "#f7f7f7"
4866 | ],
4867 | [
4868 | 0.6,
4869 | "#e6f5d0"
4870 | ],
4871 | [
4872 | 0.7,
4873 | "#b8e186"
4874 | ],
4875 | [
4876 | 0.8,
4877 | "#7fbc41"
4878 | ],
4879 | [
4880 | 0.9,
4881 | "#4d9221"
4882 | ],
4883 | [
4884 | 1,
4885 | "#276419"
4886 | ]
4887 | ],
4888 | "sequential": [
4889 | [
4890 | 0,
4891 | "#0508b8"
4892 | ],
4893 | [
4894 | 0.0893854748603352,
4895 | "#1910d8"
4896 | ],
4897 | [
4898 | 0.1787709497206704,
4899 | "#3c19f0"
4900 | ],
4901 | [
4902 | 0.2681564245810056,
4903 | "#6b1cfb"
4904 | ],
4905 | [
4906 | 0.3575418994413408,
4907 | "#981cfd"
4908 | ],
4909 | [
4910 | 0.44692737430167595,
4911 | "#bf1cfd"
4912 | ],
4913 | [
4914 | 0.5363128491620112,
4915 | "#dd2bfd"
4916 | ],
4917 | [
4918 | 0.6256983240223464,
4919 | "#f246fe"
4920 | ],
4921 | [
4922 | 0.7150837988826816,
4923 | "#fc67fd"
4924 | ],
4925 | [
4926 | 0.8044692737430168,
4927 | "#fe88fc"
4928 | ],
4929 | [
4930 | 0.8938547486033519,
4931 | "#fea5fd"
4932 | ],
4933 | [
4934 | 0.9832402234636871,
4935 | "#febefe"
4936 | ],
4937 | [
4938 | 1,
4939 | "#fec3fe"
4940 | ]
4941 | ],
4942 | "sequentialminus": [
4943 | [
4944 | 0,
4945 | "#0508b8"
4946 | ],
4947 | [
4948 | 0.0893854748603352,
4949 | "#1910d8"
4950 | ],
4951 | [
4952 | 0.1787709497206704,
4953 | "#3c19f0"
4954 | ],
4955 | [
4956 | 0.2681564245810056,
4957 | "#6b1cfb"
4958 | ],
4959 | [
4960 | 0.3575418994413408,
4961 | "#981cfd"
4962 | ],
4963 | [
4964 | 0.44692737430167595,
4965 | "#bf1cfd"
4966 | ],
4967 | [
4968 | 0.5363128491620112,
4969 | "#dd2bfd"
4970 | ],
4971 | [
4972 | 0.6256983240223464,
4973 | "#f246fe"
4974 | ],
4975 | [
4976 | 0.7150837988826816,
4977 | "#fc67fd"
4978 | ],
4979 | [
4980 | 0.8044692737430168,
4981 | "#fe88fc"
4982 | ],
4983 | [
4984 | 0.8938547486033519,
4985 | "#fea5fd"
4986 | ],
4987 | [
4988 | 0.9832402234636871,
4989 | "#febefe"
4990 | ],
4991 | [
4992 | 1,
4993 | "#fec3fe"
4994 | ]
4995 | ]
4996 | },
4997 | "colorway": [
4998 | "#636efa",
4999 | "#EF553B",
5000 | "#00cc96",
5001 | "#ab63fa",
5002 | "#19d3f3",
5003 | "#e763fa",
5004 | "#FECB52",
5005 | "#FFA15A",
5006 | "#FF6692",
5007 | "#B6E880"
5008 | ],
5009 | "font": {
5010 | "color": "#2a3f5f"
5011 | },
5012 | "geo": {
5013 | "bgcolor": "white",
5014 | "lakecolor": "white",
5015 | "landcolor": "#E5ECF6",
5016 | "showlakes": true,
5017 | "showland": true,
5018 | "subunitcolor": "white"
5019 | },
5020 | "hoverlabel": {
5021 | "align": "left"
5022 | },
5023 | "hovermode": "closest",
5024 | "mapbox": {
5025 | "style": "light"
5026 | },
5027 | "paper_bgcolor": "white",
5028 | "plot_bgcolor": "#E5ECF6",
5029 | "polar": {
5030 | "angularaxis": {
5031 | "gridcolor": "white",
5032 | "linecolor": "white",
5033 | "ticks": ""
5034 | },
5035 | "bgcolor": "#E5ECF6",
5036 | "radialaxis": {
5037 | "gridcolor": "white",
5038 | "linecolor": "white",
5039 | "ticks": ""
5040 | }
5041 | },
5042 | "scene": {
5043 | "xaxis": {
5044 | "backgroundcolor": "#E5ECF6",
5045 | "gridcolor": "white",
5046 | "gridwidth": 2,
5047 | "linecolor": "white",
5048 | "showbackground": true,
5049 | "ticks": "",
5050 | "zerolinecolor": "white"
5051 | },
5052 | "yaxis": {
5053 | "backgroundcolor": "#E5ECF6",
5054 | "gridcolor": "white",
5055 | "gridwidth": 2,
5056 | "linecolor": "white",
5057 | "showbackground": true,
5058 | "ticks": "",
5059 | "zerolinecolor": "white"
5060 | },
5061 | "zaxis": {
5062 | "backgroundcolor": "#E5ECF6",
5063 | "gridcolor": "white",
5064 | "gridwidth": 2,
5065 | "linecolor": "white",
5066 | "showbackground": true,
5067 | "ticks": "",
5068 | "zerolinecolor": "white"
5069 | }
5070 | },
5071 | "shapedefaults": {
5072 | "fillcolor": "#506784",
5073 | "line": {
5074 | "width": 0
5075 | },
5076 | "opacity": 0.4
5077 | },
5078 | "ternary": {
5079 | "aaxis": {
5080 | "gridcolor": "white",
5081 | "linecolor": "white",
5082 | "ticks": ""
5083 | },
5084 | "baxis": {
5085 | "gridcolor": "white",
5086 | "linecolor": "white",
5087 | "ticks": ""
5088 | },
5089 | "bgcolor": "#E5ECF6",
5090 | "caxis": {
5091 | "gridcolor": "white",
5092 | "linecolor": "white",
5093 | "ticks": ""
5094 | }
5095 | },
5096 | "title": {
5097 | "x": 0.05
5098 | },
5099 | "xaxis": {
5100 | "automargin": true,
5101 | "gridcolor": "white",
5102 | "linecolor": "white",
5103 | "ticks": "",
5104 | "zerolinecolor": "white",
5105 | "zerolinewidth": 2
5106 | },
5107 | "yaxis": {
5108 | "automargin": true,
5109 | "gridcolor": "white",
5110 | "linecolor": "white",
5111 | "ticks": "",
5112 | "zerolinecolor": "white",
5113 | "zerolinewidth": 2
5114 | }
5115 | }
5116 | },
5117 | "xaxis": {
5118 | "categoryarray": [
5119 | "ChrisGayle",
5120 | " Brendon McCullum",
5121 | " AB de Villiers",
5122 | " Chris Gayle",
5123 | " Rishabh Pant",
5124 | " Murali Vijay",
5125 | " David Warner",
5126 | " Virender Sehwag"
5127 | ],
5128 | "categoryorder": "array",
5129 | "title": {
5130 | "text": "PLAYER"
5131 | }
5132 | },
5133 | "yaxis": {
5134 | "title": {
5135 | "text": "HS"
5136 | }
5137 | }
5138 | }
5139 | },
5140 | "text/html": [
5141 | "\n",
5142 | " \n",
5143 | " \n",
5144 | "
\n",
5145 | " \n",
5184 | "
"
5185 | ]
5186 | },
5187 | "metadata": {},
5188 | "output_type": "display_data"
5189 | }
5190 | ],
5191 | "source": [
5192 | "px.scatter(high_score_in,x=\"PLAYER\",y=\"HS\",color='PLAYER', size=\"HS\",size_max=100)\n"
5193 | ]
5194 | },
5195 | {
5196 | "cell_type": "code",
5197 | "execution_count": 258,
5198 | "metadata": {},
5199 | "outputs": [
5200 | {
5201 | "data": {
5202 | "application/vnd.plotly.v1+json": {
5203 | "config": {
5204 | "linkText": "Export to plot.ly",
5205 | "plotlyServerURL": "https://plot.ly",
5206 | "showLink": false
5207 | },
5208 | "data": [
5209 | {
5210 | "hoverlabel": {
5211 | "namelength": 0
5212 | },
5213 | "hovertemplate": "Country=SL
Player=%{x}
Wkts=%{marker.size}",
5214 | "legendgroup": "Country=SL",
5215 | "marker": {
5216 | "color": "#636efa",
5217 | "size": [
5218 | 170
5219 | ],
5220 | "sizemode": "area",
5221 | "sizeref": 0.00425,
5222 | "symbol": "circle"
5223 | },
5224 | "mode": "markers",
5225 | "name": "Country=SL",
5226 | "showlegend": true,
5227 | "type": "scatter",
5228 | "uid": "1d9b030a-3e94-44f4-8ee9-21d176888298",
5229 | "x": [
5230 | "LasithMalinga"
5231 | ],
5232 | "xaxis": "x",
5233 | "y": [
5234 | 170
5235 | ],
5236 | "yaxis": "y"
5237 | },
5238 | {
5239 | "hoverlabel": {
5240 | "namelength": 0
5241 | },
5242 | "hovertemplate": "Country=Ind
Player=%{x}
Wkts=%{marker.size}",
5243 | "legendgroup": "Country=Ind",
5244 | "marker": {
5245 | "color": "#EF553B",
5246 | "size": [
5247 | 157,
5248 | 150,
5249 | 150,
5250 | 133,
5251 | 125,
5252 | 119,
5253 | 108
5254 | ],
5255 | "sizemode": "area",
5256 | "sizeref": 0.00425,
5257 | "symbol": "circle"
5258 | },
5259 | "mode": "markers",
5260 | "name": "Country=Ind",
5261 | "showlegend": true,
5262 | "type": "scatter",
5263 | "uid": "771e0850-cf03-4b7e-81e1-c9f12940112b",
5264 | "x": [
5265 | " Amit Mishra",
5266 | " Harbhajan Singh",
5267 | " Piyush Chawla",
5268 | " Bhuvneshwar Kumar",
5269 | " Ravichandran Ashwin",
5270 | " Umesh Yadav",
5271 | " Ravindra Jadeja"
5272 | ],
5273 | "xaxis": "x",
5274 | "y": [
5275 | 157,
5276 | 150,
5277 | 150,
5278 | 133,
5279 | 125,
5280 | 119,
5281 | 108
5282 | ],
5283 | "yaxis": "y"
5284 | },
5285 | {
5286 | "hoverlabel": {
5287 | "namelength": 0
5288 | },
5289 | "hovertemplate": "Country=WI
Player=%{x}
Wkts=%{marker.size}",
5290 | "legendgroup": "Country=WI",
5291 | "marker": {
5292 | "color": "#00cc96",
5293 | "size": [
5294 | 147,
5295 | 122
5296 | ],
5297 | "sizemode": "area",
5298 | "sizeref": 0.00425,
5299 | "symbol": "circle"
5300 | },
5301 | "mode": "markers",
5302 | "name": "Country=WI",
5303 | "showlegend": true,
5304 | "type": "scatter",
5305 | "uid": "67454994-35bb-4ece-8786-674f28ef188d",
5306 | "x": [
5307 | " Dwayne Bravo",
5308 | " Sunil Narine"
5309 | ],
5310 | "xaxis": "x",
5311 | "y": [
5312 | 147,
5313 | 122
5314 | ],
5315 | "yaxis": "y"
5316 | }
5317 | ],
5318 | "layout": {
5319 | "grid": {
5320 | "xaxes": [
5321 | "x"
5322 | ],
5323 | "xgap": 0.1,
5324 | "xside": "bottom",
5325 | "yaxes": [
5326 | "y"
5327 | ],
5328 | "ygap": 0.1,
5329 | "yside": "left"
5330 | },
5331 | "height": 600,
5332 | "legend": {
5333 | "itemsizing": "constant",
5334 | "tracegroupgap": 0
5335 | },
5336 | "margin": {
5337 | "t": 60
5338 | },
5339 | "template": {
5340 | "data": {
5341 | "bar": [
5342 | {
5343 | "marker": {
5344 | "line": {
5345 | "color": "#E5ECF6",
5346 | "width": 0.5
5347 | }
5348 | },
5349 | "type": "bar"
5350 | }
5351 | ],
5352 | "barpolar": [
5353 | {
5354 | "marker": {
5355 | "line": {
5356 | "color": "#E5ECF6",
5357 | "width": 0.5
5358 | }
5359 | },
5360 | "type": "barpolar"
5361 | }
5362 | ],
5363 | "carpet": [
5364 | {
5365 | "aaxis": {
5366 | "endlinecolor": "#2a3f5f",
5367 | "gridcolor": "white",
5368 | "linecolor": "white",
5369 | "minorgridcolor": "white",
5370 | "startlinecolor": "#2a3f5f"
5371 | },
5372 | "baxis": {
5373 | "endlinecolor": "#2a3f5f",
5374 | "gridcolor": "white",
5375 | "linecolor": "white",
5376 | "minorgridcolor": "white",
5377 | "startlinecolor": "#2a3f5f"
5378 | },
5379 | "type": "carpet"
5380 | }
5381 | ],
5382 | "choropleth": [
5383 | {
5384 | "colorbar": {
5385 | "outlinewidth": 0,
5386 | "ticks": ""
5387 | },
5388 | "type": "choropleth"
5389 | }
5390 | ],
5391 | "contour": [
5392 | {
5393 | "colorbar": {
5394 | "outlinewidth": 0,
5395 | "ticks": ""
5396 | },
5397 | "colorscale": [
5398 | [
5399 | 0,
5400 | "#0508b8"
5401 | ],
5402 | [
5403 | 0.0893854748603352,
5404 | "#1910d8"
5405 | ],
5406 | [
5407 | 0.1787709497206704,
5408 | "#3c19f0"
5409 | ],
5410 | [
5411 | 0.2681564245810056,
5412 | "#6b1cfb"
5413 | ],
5414 | [
5415 | 0.3575418994413408,
5416 | "#981cfd"
5417 | ],
5418 | [
5419 | 0.44692737430167595,
5420 | "#bf1cfd"
5421 | ],
5422 | [
5423 | 0.5363128491620112,
5424 | "#dd2bfd"
5425 | ],
5426 | [
5427 | 0.6256983240223464,
5428 | "#f246fe"
5429 | ],
5430 | [
5431 | 0.7150837988826816,
5432 | "#fc67fd"
5433 | ],
5434 | [
5435 | 0.8044692737430168,
5436 | "#fe88fc"
5437 | ],
5438 | [
5439 | 0.8938547486033519,
5440 | "#fea5fd"
5441 | ],
5442 | [
5443 | 0.9832402234636871,
5444 | "#febefe"
5445 | ],
5446 | [
5447 | 1,
5448 | "#fec3fe"
5449 | ]
5450 | ],
5451 | "type": "contour"
5452 | }
5453 | ],
5454 | "contourcarpet": [
5455 | {
5456 | "colorbar": {
5457 | "outlinewidth": 0,
5458 | "ticks": ""
5459 | },
5460 | "type": "contourcarpet"
5461 | }
5462 | ],
5463 | "heatmap": [
5464 | {
5465 | "colorbar": {
5466 | "outlinewidth": 0,
5467 | "ticks": ""
5468 | },
5469 | "colorscale": [
5470 | [
5471 | 0,
5472 | "#0508b8"
5473 | ],
5474 | [
5475 | 0.0893854748603352,
5476 | "#1910d8"
5477 | ],
5478 | [
5479 | 0.1787709497206704,
5480 | "#3c19f0"
5481 | ],
5482 | [
5483 | 0.2681564245810056,
5484 | "#6b1cfb"
5485 | ],
5486 | [
5487 | 0.3575418994413408,
5488 | "#981cfd"
5489 | ],
5490 | [
5491 | 0.44692737430167595,
5492 | "#bf1cfd"
5493 | ],
5494 | [
5495 | 0.5363128491620112,
5496 | "#dd2bfd"
5497 | ],
5498 | [
5499 | 0.6256983240223464,
5500 | "#f246fe"
5501 | ],
5502 | [
5503 | 0.7150837988826816,
5504 | "#fc67fd"
5505 | ],
5506 | [
5507 | 0.8044692737430168,
5508 | "#fe88fc"
5509 | ],
5510 | [
5511 | 0.8938547486033519,
5512 | "#fea5fd"
5513 | ],
5514 | [
5515 | 0.9832402234636871,
5516 | "#febefe"
5517 | ],
5518 | [
5519 | 1,
5520 | "#fec3fe"
5521 | ]
5522 | ],
5523 | "type": "heatmap"
5524 | }
5525 | ],
5526 | "heatmapgl": [
5527 | {
5528 | "colorbar": {
5529 | "outlinewidth": 0,
5530 | "ticks": ""
5531 | },
5532 | "type": "heatmapgl"
5533 | }
5534 | ],
5535 | "histogram": [
5536 | {
5537 | "marker": {
5538 | "colorbar": {
5539 | "outlinewidth": 0,
5540 | "ticks": ""
5541 | }
5542 | },
5543 | "type": "histogram"
5544 | }
5545 | ],
5546 | "histogram2d": [
5547 | {
5548 | "colorbar": {
5549 | "outlinewidth": 0,
5550 | "ticks": ""
5551 | },
5552 | "colorscale": [
5553 | [
5554 | 0,
5555 | "#0508b8"
5556 | ],
5557 | [
5558 | 0.0893854748603352,
5559 | "#1910d8"
5560 | ],
5561 | [
5562 | 0.1787709497206704,
5563 | "#3c19f0"
5564 | ],
5565 | [
5566 | 0.2681564245810056,
5567 | "#6b1cfb"
5568 | ],
5569 | [
5570 | 0.3575418994413408,
5571 | "#981cfd"
5572 | ],
5573 | [
5574 | 0.44692737430167595,
5575 | "#bf1cfd"
5576 | ],
5577 | [
5578 | 0.5363128491620112,
5579 | "#dd2bfd"
5580 | ],
5581 | [
5582 | 0.6256983240223464,
5583 | "#f246fe"
5584 | ],
5585 | [
5586 | 0.7150837988826816,
5587 | "#fc67fd"
5588 | ],
5589 | [
5590 | 0.8044692737430168,
5591 | "#fe88fc"
5592 | ],
5593 | [
5594 | 0.8938547486033519,
5595 | "#fea5fd"
5596 | ],
5597 | [
5598 | 0.9832402234636871,
5599 | "#febefe"
5600 | ],
5601 | [
5602 | 1,
5603 | "#fec3fe"
5604 | ]
5605 | ],
5606 | "type": "histogram2d"
5607 | }
5608 | ],
5609 | "histogram2dcontour": [
5610 | {
5611 | "colorbar": {
5612 | "outlinewidth": 0,
5613 | "ticks": ""
5614 | },
5615 | "colorscale": [
5616 | [
5617 | 0,
5618 | "#0508b8"
5619 | ],
5620 | [
5621 | 0.0893854748603352,
5622 | "#1910d8"
5623 | ],
5624 | [
5625 | 0.1787709497206704,
5626 | "#3c19f0"
5627 | ],
5628 | [
5629 | 0.2681564245810056,
5630 | "#6b1cfb"
5631 | ],
5632 | [
5633 | 0.3575418994413408,
5634 | "#981cfd"
5635 | ],
5636 | [
5637 | 0.44692737430167595,
5638 | "#bf1cfd"
5639 | ],
5640 | [
5641 | 0.5363128491620112,
5642 | "#dd2bfd"
5643 | ],
5644 | [
5645 | 0.6256983240223464,
5646 | "#f246fe"
5647 | ],
5648 | [
5649 | 0.7150837988826816,
5650 | "#fc67fd"
5651 | ],
5652 | [
5653 | 0.8044692737430168,
5654 | "#fe88fc"
5655 | ],
5656 | [
5657 | 0.8938547486033519,
5658 | "#fea5fd"
5659 | ],
5660 | [
5661 | 0.9832402234636871,
5662 | "#febefe"
5663 | ],
5664 | [
5665 | 1,
5666 | "#fec3fe"
5667 | ]
5668 | ],
5669 | "type": "histogram2dcontour"
5670 | }
5671 | ],
5672 | "mesh3d": [
5673 | {
5674 | "colorbar": {
5675 | "outlinewidth": 0,
5676 | "ticks": ""
5677 | },
5678 | "type": "mesh3d"
5679 | }
5680 | ],
5681 | "parcoords": [
5682 | {
5683 | "line": {
5684 | "colorbar": {
5685 | "outlinewidth": 0,
5686 | "ticks": ""
5687 | }
5688 | },
5689 | "type": "parcoords"
5690 | }
5691 | ],
5692 | "scatter": [
5693 | {
5694 | "marker": {
5695 | "colorbar": {
5696 | "outlinewidth": 0,
5697 | "ticks": ""
5698 | }
5699 | },
5700 | "type": "scatter"
5701 | }
5702 | ],
5703 | "scatter3d": [
5704 | {
5705 | "marker": {
5706 | "colorbar": {
5707 | "outlinewidth": 0,
5708 | "ticks": ""
5709 | }
5710 | },
5711 | "type": "scatter3d"
5712 | }
5713 | ],
5714 | "scattercarpet": [
5715 | {
5716 | "marker": {
5717 | "colorbar": {
5718 | "outlinewidth": 0,
5719 | "ticks": ""
5720 | }
5721 | },
5722 | "type": "scattercarpet"
5723 | }
5724 | ],
5725 | "scattergeo": [
5726 | {
5727 | "marker": {
5728 | "colorbar": {
5729 | "outlinewidth": 0,
5730 | "ticks": ""
5731 | }
5732 | },
5733 | "type": "scattergeo"
5734 | }
5735 | ],
5736 | "scattergl": [
5737 | {
5738 | "marker": {
5739 | "colorbar": {
5740 | "outlinewidth": 0,
5741 | "ticks": ""
5742 | }
5743 | },
5744 | "type": "scattergl"
5745 | }
5746 | ],
5747 | "scattermapbox": [
5748 | {
5749 | "marker": {
5750 | "colorbar": {
5751 | "outlinewidth": 0,
5752 | "ticks": ""
5753 | }
5754 | },
5755 | "type": "scattermapbox"
5756 | }
5757 | ],
5758 | "scatterpolar": [
5759 | {
5760 | "marker": {
5761 | "colorbar": {
5762 | "outlinewidth": 0,
5763 | "ticks": ""
5764 | }
5765 | },
5766 | "type": "scatterpolar"
5767 | }
5768 | ],
5769 | "scatterpolargl": [
5770 | {
5771 | "marker": {
5772 | "colorbar": {
5773 | "outlinewidth": 0,
5774 | "ticks": ""
5775 | }
5776 | },
5777 | "type": "scatterpolargl"
5778 | }
5779 | ],
5780 | "scatterternary": [
5781 | {
5782 | "marker": {
5783 | "colorbar": {
5784 | "outlinewidth": 0,
5785 | "ticks": ""
5786 | }
5787 | },
5788 | "type": "scatterternary"
5789 | }
5790 | ],
5791 | "surface": [
5792 | {
5793 | "colorbar": {
5794 | "outlinewidth": 0,
5795 | "ticks": ""
5796 | },
5797 | "type": "surface"
5798 | }
5799 | ],
5800 | "table": [
5801 | {
5802 | "cells": {
5803 | "fill": {
5804 | "color": "#EBF0F8"
5805 | },
5806 | "line": {
5807 | "color": "white"
5808 | }
5809 | },
5810 | "header": {
5811 | "fill": {
5812 | "color": "#C8D4E3"
5813 | },
5814 | "line": {
5815 | "color": "white"
5816 | }
5817 | },
5818 | "type": "table"
5819 | }
5820 | ]
5821 | },
5822 | "layout": {
5823 | "annotationdefaults": {
5824 | "arrowcolor": "#506784",
5825 | "arrowhead": 0,
5826 | "arrowwidth": 1
5827 | },
5828 | "colorscale": {
5829 | "diverging": [
5830 | [
5831 | 0,
5832 | "#8e0152"
5833 | ],
5834 | [
5835 | 0.1,
5836 | "#c51b7d"
5837 | ],
5838 | [
5839 | 0.2,
5840 | "#de77ae"
5841 | ],
5842 | [
5843 | 0.3,
5844 | "#f1b6da"
5845 | ],
5846 | [
5847 | 0.4,
5848 | "#fde0ef"
5849 | ],
5850 | [
5851 | 0.5,
5852 | "#f7f7f7"
5853 | ],
5854 | [
5855 | 0.6,
5856 | "#e6f5d0"
5857 | ],
5858 | [
5859 | 0.7,
5860 | "#b8e186"
5861 | ],
5862 | [
5863 | 0.8,
5864 | "#7fbc41"
5865 | ],
5866 | [
5867 | 0.9,
5868 | "#4d9221"
5869 | ],
5870 | [
5871 | 1,
5872 | "#276419"
5873 | ]
5874 | ],
5875 | "sequential": [
5876 | [
5877 | 0,
5878 | "#0508b8"
5879 | ],
5880 | [
5881 | 0.0893854748603352,
5882 | "#1910d8"
5883 | ],
5884 | [
5885 | 0.1787709497206704,
5886 | "#3c19f0"
5887 | ],
5888 | [
5889 | 0.2681564245810056,
5890 | "#6b1cfb"
5891 | ],
5892 | [
5893 | 0.3575418994413408,
5894 | "#981cfd"
5895 | ],
5896 | [
5897 | 0.44692737430167595,
5898 | "#bf1cfd"
5899 | ],
5900 | [
5901 | 0.5363128491620112,
5902 | "#dd2bfd"
5903 | ],
5904 | [
5905 | 0.6256983240223464,
5906 | "#f246fe"
5907 | ],
5908 | [
5909 | 0.7150837988826816,
5910 | "#fc67fd"
5911 | ],
5912 | [
5913 | 0.8044692737430168,
5914 | "#fe88fc"
5915 | ],
5916 | [
5917 | 0.8938547486033519,
5918 | "#fea5fd"
5919 | ],
5920 | [
5921 | 0.9832402234636871,
5922 | "#febefe"
5923 | ],
5924 | [
5925 | 1,
5926 | "#fec3fe"
5927 | ]
5928 | ],
5929 | "sequentialminus": [
5930 | [
5931 | 0,
5932 | "#0508b8"
5933 | ],
5934 | [
5935 | 0.0893854748603352,
5936 | "#1910d8"
5937 | ],
5938 | [
5939 | 0.1787709497206704,
5940 | "#3c19f0"
5941 | ],
5942 | [
5943 | 0.2681564245810056,
5944 | "#6b1cfb"
5945 | ],
5946 | [
5947 | 0.3575418994413408,
5948 | "#981cfd"
5949 | ],
5950 | [
5951 | 0.44692737430167595,
5952 | "#bf1cfd"
5953 | ],
5954 | [
5955 | 0.5363128491620112,
5956 | "#dd2bfd"
5957 | ],
5958 | [
5959 | 0.6256983240223464,
5960 | "#f246fe"
5961 | ],
5962 | [
5963 | 0.7150837988826816,
5964 | "#fc67fd"
5965 | ],
5966 | [
5967 | 0.8044692737430168,
5968 | "#fe88fc"
5969 | ],
5970 | [
5971 | 0.8938547486033519,
5972 | "#fea5fd"
5973 | ],
5974 | [
5975 | 0.9832402234636871,
5976 | "#febefe"
5977 | ],
5978 | [
5979 | 1,
5980 | "#fec3fe"
5981 | ]
5982 | ]
5983 | },
5984 | "colorway": [
5985 | "#636efa",
5986 | "#EF553B",
5987 | "#00cc96",
5988 | "#ab63fa",
5989 | "#19d3f3",
5990 | "#e763fa",
5991 | "#FECB52",
5992 | "#FFA15A",
5993 | "#FF6692",
5994 | "#B6E880"
5995 | ],
5996 | "font": {
5997 | "color": "#2a3f5f"
5998 | },
5999 | "geo": {
6000 | "bgcolor": "white",
6001 | "lakecolor": "white",
6002 | "landcolor": "#E5ECF6",
6003 | "showlakes": true,
6004 | "showland": true,
6005 | "subunitcolor": "white"
6006 | },
6007 | "hoverlabel": {
6008 | "align": "left"
6009 | },
6010 | "hovermode": "closest",
6011 | "mapbox": {
6012 | "style": "light"
6013 | },
6014 | "paper_bgcolor": "white",
6015 | "plot_bgcolor": "#E5ECF6",
6016 | "polar": {
6017 | "angularaxis": {
6018 | "gridcolor": "white",
6019 | "linecolor": "white",
6020 | "ticks": ""
6021 | },
6022 | "bgcolor": "#E5ECF6",
6023 | "radialaxis": {
6024 | "gridcolor": "white",
6025 | "linecolor": "white",
6026 | "ticks": ""
6027 | }
6028 | },
6029 | "scene": {
6030 | "xaxis": {
6031 | "backgroundcolor": "#E5ECF6",
6032 | "gridcolor": "white",
6033 | "gridwidth": 2,
6034 | "linecolor": "white",
6035 | "showbackground": true,
6036 | "ticks": "",
6037 | "zerolinecolor": "white"
6038 | },
6039 | "yaxis": {
6040 | "backgroundcolor": "#E5ECF6",
6041 | "gridcolor": "white",
6042 | "gridwidth": 2,
6043 | "linecolor": "white",
6044 | "showbackground": true,
6045 | "ticks": "",
6046 | "zerolinecolor": "white"
6047 | },
6048 | "zaxis": {
6049 | "backgroundcolor": "#E5ECF6",
6050 | "gridcolor": "white",
6051 | "gridwidth": 2,
6052 | "linecolor": "white",
6053 | "showbackground": true,
6054 | "ticks": "",
6055 | "zerolinecolor": "white"
6056 | }
6057 | },
6058 | "shapedefaults": {
6059 | "fillcolor": "#506784",
6060 | "line": {
6061 | "width": 0
6062 | },
6063 | "opacity": 0.4
6064 | },
6065 | "ternary": {
6066 | "aaxis": {
6067 | "gridcolor": "white",
6068 | "linecolor": "white",
6069 | "ticks": ""
6070 | },
6071 | "baxis": {
6072 | "gridcolor": "white",
6073 | "linecolor": "white",
6074 | "ticks": ""
6075 | },
6076 | "bgcolor": "#E5ECF6",
6077 | "caxis": {
6078 | "gridcolor": "white",
6079 | "linecolor": "white",
6080 | "ticks": ""
6081 | }
6082 | },
6083 | "title": {
6084 | "x": 0.05
6085 | },
6086 | "xaxis": {
6087 | "automargin": true,
6088 | "gridcolor": "white",
6089 | "linecolor": "white",
6090 | "ticks": "",
6091 | "zerolinecolor": "white",
6092 | "zerolinewidth": 2
6093 | },
6094 | "yaxis": {
6095 | "automargin": true,
6096 | "gridcolor": "white",
6097 | "linecolor": "white",
6098 | "ticks": "",
6099 | "zerolinecolor": "white",
6100 | "zerolinewidth": 2
6101 | }
6102 | }
6103 | },
6104 | "xaxis": {
6105 | "title": {
6106 | "text": "Player"
6107 | }
6108 | },
6109 | "yaxis": {
6110 | "title": {
6111 | "text": "Wkts"
6112 | }
6113 | }
6114 | }
6115 | },
6116 | "text/html": [
6117 | "\n",
6118 | " \n",
6119 | " \n",
6120 | "
\n",
6121 | " \n",
6160 | "
"
6161 | ]
6162 | },
6163 | "metadata": {},
6164 | "output_type": "display_data"
6165 | }
6166 | ],
6167 | "source": [
6168 | "px.scatter(wickets_data[:10],x='Player',y='Wkts',color='Country', size='Wkts',size_max=200)"
6169 | ]
6170 | },
6171 | {
6172 | "cell_type": "code",
6173 | "execution_count": null,
6174 | "metadata": {},
6175 | "outputs": [],
6176 | "source": []
6177 | },
6178 | {
6179 | "cell_type": "markdown",
6180 | "metadata": {
6181 | "collapsed": true
6182 | },
6183 | "source": [
6184 | "# congrats yourself !!! clap !!! "
6185 | ]
6186 | }
6187 | ],
6188 | "metadata": {
6189 | "anaconda-cloud": {},
6190 | "kernelspec": {
6191 | "display_name": "Python (bellora)",
6192 | "language": "python",
6193 | "name": "bellora"
6194 | },
6195 | "language_info": {
6196 | "codemirror_mode": {
6197 | "name": "ipython",
6198 | "version": 3
6199 | },
6200 | "file_extension": ".py",
6201 | "mimetype": "text/x-python",
6202 | "name": "python",
6203 | "nbconvert_exporter": "python",
6204 | "pygments_lexer": "ipython3",
6205 | "version": "3.7.1"
6206 | }
6207 | },
6208 | "nbformat": 4,
6209 | "nbformat_minor": 1
6210 | }
6211 |
--------------------------------------------------------------------------------
/ipl_data/high_score_in.csv:
--------------------------------------------------------------------------------
1 | POS,PLAYER,HS,BF,4s,6s,NO
2 | 1,ChrisGayle,175,66,13,17,Y
3 | 2, Brendon McCullum,158,73,10,13,Y
4 | 3, AB de Villiers,133,59,19,4,Y
5 | 4, AB de Villiers,129,52,10,12,Y
6 | 5, Chris Gayle,128,62,7,13,Y
7 | 6, Rishabh Pant,128,63,15,7,Y
8 | 7, Murali Vijay,127,56,8,11,N
9 | 8, David Warner,126,59,10,8,N
10 | 9, Virender Sehwag,122,58,12,8,N
11 |
--------------------------------------------------------------------------------
/ipl_data/ipl.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thepradip/Python-Beginner-Series-IPL/1db163aa8ea564d75a9f02619de52fda2f136b47/ipl_data/ipl.jpeg
--------------------------------------------------------------------------------
/ipl_data/most_sixes_all_times.csv:
--------------------------------------------------------------------------------
1 | id,Player,Sixes,Country
2 | 1,ChrisGayle,326,WI
3 | 2, AB de Villiers,212,SA
4 | 3, MS Dhoni,209,Ind
5 | 4, Rohit Sharma,194,Ind
6 | 5, Suresh Raina,194,Ind
7 | 6, Virat Kohli,191,Ind
8 | 7, David Warner,181,Aus
9 | 8, Shane Watson,177,Aus
10 | 9, Kieron Pollard,176,WI
11 | 10, Yusuf Pathan,158,Ind
12 | 11, Robin Uthappa,156,Ind
13 | 12, Yuvraj Singh,149,Ind
14 | 13, Brendon McCullum,130,NZ
15 | 14, Andre Russell,120,WI
16 | 15, Ambati Rayudu,120,Ind
17 | 16, Dwayne Smith,117,WI
18 | 17, Virender Sehwag,106,Ind
19 | 18, Dinesh Karthik,101,Ind
20 | 19, Shikhar Dhawan,96,Ind
21 | 20, Rishabh Pant,94,Ind
22 | 21, Adam Gilchrist,92,Aus
23 | 22, Glenn Maxwell,91,Aus
24 | 23, Murali Vijay,91,Ind
25 | 24, Sanju Samson,89,Ind
26 | 25, David Miller,87,SA
27 | 26, KL Rahul,81,Ind
28 | 27, JP Duminy,79,SA
29 | 28, Naman Ojha,79,Ind
30 | 29, Shaun Marsh,78,Aus
31 | 30, Manish Pandey,75,Ind
32 |
--------------------------------------------------------------------------------
/ipl_data/most_wickets_all_times.csv:
--------------------------------------------------------------------------------
1 | id,Player,Mat,Wkts,Country
2 | 1,LasithMalinga,122,170,SL
3 | 2, Amit Mishra,147,157,Ind
4 | 3, Harbhajan Singh,160,150,Ind
5 | 4, Piyush Chawla,157,150,Ind
6 | 5, Dwayne Bravo,134,147,WI
7 | 6, Bhuvneshwar Kumar,117,133,Ind
8 | 7, Ravichandran Ashwin,139,125,Ind
9 | 8, Sunil Narine,110,122,WI
10 | 9, Umesh Yadav,119,119,Ind
11 | 10, Ravindra Jadeja,170,108,Ind
12 | 11, Ashish Nehra,88,106,Ind
13 | 12, Vinay Kumar,105,105,Ind
14 | 13, Zaheer Khan,100,102,Ind
15 | 14, Yuzvendra Chahal,84,100,Ind
16 | 15, Dale Steyn,92,96,SA
17 | 16, Sandeep Sharma,79,95,Ind
18 | 17, Shane Watson,134,92,Aus
19 | 18, Mohit Sharma,85,91,Ind
20 | 19, Praveen Kumar,119,90,Ind
21 | 20, RP Singh,82,90,Ind
22 | 21, Pragyan Ojha,92,89,Ind
23 | 22, Dhawal Kulkarni,90,86,Ind
24 | 23, Albie Morkel,91,85,SA
25 | 24, Jasprit Bumrah,77,82,Ind
26 | 25, Irfan Pathan,103,80,Ind
27 | 26, Imran Tahir,55,79,SA
28 | 27, Morne Morkel,70,77,SA
29 | 28, Jaydev Unadkat,73,77,Ind
30 | 29, Lakshmipathy Balaji,73,76,Ind
31 | 30, Munaf Patel,63,74,Ind
32 |
--------------------------------------------------------------------------------