├── .ipynb_checkpoints ├── Dynamic Plotting_1-checkpoint.ipynb ├── Few Selected Topics in Python-checkpoint.ipynb ├── Groupby and aggregation-checkpoint.ipynb ├── Matplotlib_starter-checkpoint.ipynb ├── Numpy_Ramen-checkpoint.ipynb ├── OOPS-checkpoint.ipynb ├── Python Basics-checkpoint.ipynb ├── Tuple_List_Dictionary_Ramen-checkpoint.ipynb ├── pandas- Starter_Series_DataFrame-checkpoint.ipynb ├── pandas-Data Cleaning & Processing I-checkpoint.ipynb ├── pandas-Starter_Series_DataFrame-checkpoint.ipynb └── pandas-Starter_Series_DataFrame.ipynb-checkpoint.ipynb ├── BTU.csv ├── Few Selected Topics in Python.ipynb ├── Groupby and aggregation.ipynb ├── LICENSE ├── Matplotlib_starter.ipynb ├── Numpy_Ramen.ipynb ├── OOPS.ipynb ├── Practice Problem_ Basic Python_1.ipynb ├── Python Basics.ipynb ├── README.md ├── Tuple_List_Dictionary_Ramen.ipynb ├── macrodata.csv ├── pandas-Data Cleaning & Processing I.ipynb ├── pandas-Join_Combine_Reshape.ipynb ├── pandas-Starter_Series_DataFrame.ipynb ├── pivot_table and crosstab.ipynb └── tips.csv /.ipynb_checkpoints/Tuple_List_Dictionary_Ramen-checkpoint.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "### Tuple\n", 8 | "* Coma seperated sequence of numbers or any characters with or without parenthesis." 9 | ] 10 | }, 11 | { 12 | "cell_type": "code", 13 | "execution_count": 3, 14 | "metadata": {}, 15 | "outputs": [ 16 | { 17 | "name": "stdout", 18 | "output_type": "stream", 19 | "text": [ 20 | "(4, 5, 6)\n", 21 | "(55, 66, 77)\n" 22 | ] 23 | }, 24 | { 25 | "data": { 26 | "text/plain": [ 27 | "('a', 3, 'b', 'c')" 28 | ] 29 | }, 30 | "execution_count": 3, 31 | "metadata": {}, 32 | "output_type": "execute_result" 33 | } 34 | ], 35 | "source": [ 36 | "T1 = 4, 5, 6 # Without parenthesis\n", 37 | "print(T1)\n", 38 | "T2=(55,66,77) # With paranthesis\n", 39 | "print(T2) \n", 40 | "T3='a',3,'b','c' # Mixed Data Type string and integer\n", 41 | "T3" 42 | ] 43 | }, 44 | { 45 | "cell_type": "markdown", 46 | "metadata": {}, 47 | "source": [ 48 | "We can see, result will be always with parenthesis." 49 | ] 50 | }, 51 | { 52 | "cell_type": "code", 53 | "execution_count": 3, 54 | "metadata": {}, 55 | "outputs": [ 56 | { 57 | "data": { 58 | "text/plain": [ 59 | "('a', 3, 'b', 'c')" 60 | ] 61 | }, 62 | "execution_count": 3, 63 | "metadata": {}, 64 | "output_type": "execute_result" 65 | } 66 | ], 67 | "source": [ 68 | "astr='a',3,'b','c'\n", 69 | "astr" 70 | ] 71 | }, 72 | { 73 | "cell_type": "code", 74 | "execution_count": 1, 75 | "metadata": {}, 76 | "outputs": [], 77 | "source": [ 78 | "w=('7','a')" 79 | ] 80 | }, 81 | { 82 | "cell_type": "code", 83 | "execution_count": 2, 84 | "metadata": {}, 85 | "outputs": [ 86 | { 87 | "data": { 88 | "text/plain": [ 89 | "tuple" 90 | ] 91 | }, 92 | "execution_count": 2, 93 | "metadata": {}, 94 | "output_type": "execute_result" 95 | } 96 | ], 97 | "source": [ 98 | "#checking type\n", 99 | "type(w) # return the type of data " 100 | ] 101 | }, 102 | { 103 | "cell_type": "code", 104 | "execution_count": 3, 105 | "metadata": {}, 106 | "outputs": [ 107 | { 108 | "data": { 109 | "text/plain": [ 110 | "((4, 5, 6), (7, 8))" 111 | ] 112 | }, 113 | "execution_count": 3, 114 | "metadata": {}, 115 | "output_type": "execute_result" 116 | } 117 | ], 118 | "source": [ 119 | "r1 = ((4, 5, 6), (7, 8))\n", 120 | "r1" 121 | ] 122 | }, 123 | { 124 | "cell_type": "code", 125 | "execution_count": 10, 126 | "metadata": {}, 127 | "outputs": [ 128 | { 129 | "data": { 130 | "text/plain": [ 131 | "[4, 0, 2]" 132 | ] 133 | }, 134 | "execution_count": 10, 135 | "metadata": {}, 136 | "output_type": "execute_result" 137 | } 138 | ], 139 | "source": [ 140 | "l1=[4, 0, 2] # this is list> coma seperated items inside square bracket\n", 141 | "l1" 142 | ] 143 | }, 144 | { 145 | "cell_type": "code", 146 | "execution_count": 11, 147 | "metadata": {}, 148 | "outputs": [ 149 | { 150 | "data": { 151 | "text/plain": [ 152 | "(4, 0, 2)" 153 | ] 154 | }, 155 | "execution_count": 11, 156 | "metadata": {}, 157 | "output_type": "execute_result" 158 | } 159 | ], 160 | "source": [ 161 | "az=tuple(l1)\n", 162 | "az" 163 | ] 164 | }, 165 | { 166 | "cell_type": "code", 167 | "execution_count": 103, 168 | "metadata": {}, 169 | "outputs": [ 170 | { 171 | "data": { 172 | "text/plain": [ 173 | "4" 174 | ] 175 | }, 176 | "execution_count": 103, 177 | "metadata": {}, 178 | "output_type": "execute_result" 179 | } 180 | ], 181 | "source": [ 182 | "az[0]" 183 | ] 184 | }, 185 | { 186 | "cell_type": "code", 187 | "execution_count": 35, 188 | "metadata": { 189 | "collapsed": true 190 | }, 191 | "outputs": [ 192 | { 193 | "ename": "TypeError", 194 | "evalue": "'tuple' object does not support item assignment", 195 | "output_type": "error", 196 | "traceback": [ 197 | "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", 198 | "\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)", 199 | "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0maz\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m99\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m", 200 | "\u001b[1;31mTypeError\u001b[0m: 'tuple' object does not support item assignment" 201 | ] 202 | } 203 | ], 204 | "source": [ 205 | "az[0]=99 ## Immutability " 206 | ] 207 | }, 208 | { 209 | "cell_type": "code", 210 | "execution_count": 104, 211 | "metadata": {}, 212 | "outputs": [ 213 | { 214 | "data": { 215 | "text/plain": [ 216 | "('E', 'l', 'e', 'p', 'h', 'a', 'n', 't')" 217 | ] 218 | }, 219 | "execution_count": 104, 220 | "metadata": {}, 221 | "output_type": "execute_result" 222 | } 223 | ], 224 | "source": [ 225 | "tup = tuple('Elephant')\n", 226 | "tup" 227 | ] 228 | }, 229 | { 230 | "cell_type": "code", 231 | "execution_count": 105, 232 | "metadata": {}, 233 | "outputs": [ 234 | { 235 | "data": { 236 | "text/plain": [ 237 | "'E'" 238 | ] 239 | }, 240 | "execution_count": 105, 241 | "metadata": {}, 242 | "output_type": "execute_result" 243 | } 244 | ], 245 | "source": [ 246 | "tup[0]" 247 | ] 248 | }, 249 | { 250 | "cell_type": "code", 251 | "execution_count": 36, 252 | "metadata": {}, 253 | "outputs": [ 254 | { 255 | "data": { 256 | "text/plain": [ 257 | "('fast', [1, 2], True)" 258 | ] 259 | }, 260 | "execution_count": 36, 261 | "metadata": {}, 262 | "output_type": "execute_result" 263 | } 264 | ], 265 | "source": [ 266 | "tup = tuple(['fast', [1, 2], True])\n", 267 | "tup" 268 | ] 269 | }, 270 | { 271 | "cell_type": "code", 272 | "execution_count": 9, 273 | "metadata": {}, 274 | "outputs": [ 275 | { 276 | "data": { 277 | "text/plain": [ 278 | "True" 279 | ] 280 | }, 281 | "execution_count": 9, 282 | "metadata": {}, 283 | "output_type": "execute_result" 284 | } 285 | ], 286 | "source": [ 287 | "tup[2]" 288 | ] 289 | }, 290 | { 291 | "cell_type": "code", 292 | "execution_count": 11, 293 | "metadata": { 294 | "collapsed": true 295 | }, 296 | "outputs": [ 297 | { 298 | "ename": "TypeError", 299 | "evalue": "'tuple' object does not support item assignment", 300 | "output_type": "error", 301 | "traceback": [ 302 | "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", 303 | "\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)", 304 | "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mtup\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m]\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;34m'False'\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m", 305 | "\u001b[1;31mTypeError\u001b[0m: 'tuple' object does not support item assignment" 306 | ] 307 | } 308 | ], 309 | "source": [ 310 | "tup[2] = False" 311 | ] 312 | }, 313 | { 314 | "cell_type": "code", 315 | "execution_count": 15, 316 | "metadata": { 317 | "collapsed": true 318 | }, 319 | "outputs": [ 320 | { 321 | "ename": "AttributeError", 322 | "evalue": "'bool' object has no attribute 'append'", 323 | "output_type": "error", 324 | "traceback": [ 325 | "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", 326 | "\u001b[1;31mAttributeError\u001b[0m Traceback (most recent call last)", 327 | "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mtup\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2\u001b[0m \u001b[0mtup\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", 328 | "\u001b[1;31mAttributeError\u001b[0m: 'bool' object has no attribute 'append'" 329 | ] 330 | } 331 | ], 332 | "source": [ 333 | "tup[2].append(2)\n", 334 | "tup" 335 | ] 336 | }, 337 | { 338 | "cell_type": "code", 339 | "execution_count": 16, 340 | "metadata": {}, 341 | "outputs": [ 342 | { 343 | "data": { 344 | "text/plain": [ 345 | "('foo', [1, 2, 3], True)" 346 | ] 347 | }, 348 | "execution_count": 16, 349 | "metadata": {}, 350 | "output_type": "execute_result" 351 | } 352 | ], 353 | "source": [ 354 | "tup[1].append(3)\n", 355 | "tup" 356 | ] 357 | }, 358 | { 359 | "cell_type": "code", 360 | "execution_count": 20, 361 | "metadata": { 362 | "collapsed": true 363 | }, 364 | "outputs": [ 365 | { 366 | "ename": "AttributeError", 367 | "evalue": "'str' object has no attribute 'append'", 368 | "output_type": "error", 369 | "traceback": [ 370 | "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", 371 | "\u001b[1;31mAttributeError\u001b[0m Traceback (most recent call last)", 372 | "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mtup\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m3\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2\u001b[0m \u001b[0mtup\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", 373 | "\u001b[1;31mAttributeError\u001b[0m: 'str' object has no attribute 'append'" 374 | ] 375 | } 376 | ], 377 | "source": [ 378 | "tup[0].append(3)\n", 379 | "tup" 380 | ] 381 | }, 382 | { 383 | "cell_type": "code", 384 | "execution_count": 4, 385 | "metadata": {}, 386 | "outputs": [], 387 | "source": [ 388 | "x1=(4, None, 'foo')\n", 389 | "x2=(6, 0)\n", 390 | "x3=('bar',)\n", 391 | "XX=x1+x2+x3" 392 | ] 393 | }, 394 | { 395 | "cell_type": "code", 396 | "execution_count": 5, 397 | "metadata": {}, 398 | "outputs": [ 399 | { 400 | "data": { 401 | "text/plain": [ 402 | "(4, None, 'foo')" 403 | ] 404 | }, 405 | "execution_count": 5, 406 | "metadata": {}, 407 | "output_type": "execute_result" 408 | } 409 | ], 410 | "source": [ 411 | "x1" 412 | ] 413 | }, 414 | { 415 | "cell_type": "code", 416 | "execution_count": 7, 417 | "metadata": {}, 418 | "outputs": [ 419 | { 420 | "data": { 421 | "text/plain": [ 422 | "(4, None, 'foo', 6, 0, 'bar')" 423 | ] 424 | }, 425 | "execution_count": 7, 426 | "metadata": {}, 427 | "output_type": "execute_result" 428 | } 429 | ], 430 | "source": [ 431 | "XX" 432 | ] 433 | }, 434 | { 435 | "cell_type": "code", 436 | "execution_count": 112, 437 | "metadata": {}, 438 | "outputs": [ 439 | { 440 | "data": { 441 | "text/plain": [ 442 | "(4, None, 'foo', 6, 0, 'bar')" 443 | ] 444 | }, 445 | "execution_count": 112, 446 | "metadata": {}, 447 | "output_type": "execute_result" 448 | } 449 | ], 450 | "source": [ 451 | "(4, None, 'foo') + (6, 0) + ('bar',) ## Tuple concatenation" 452 | ] 453 | }, 454 | { 455 | "cell_type": "markdown", 456 | "metadata": {}, 457 | "source": [ 458 | "#### Unpacking tuples" 459 | ] 460 | }, 461 | { 462 | "cell_type": "code", 463 | "execution_count": 8, 464 | "metadata": {}, 465 | "outputs": [], 466 | "source": [ 467 | "tup = (4, 5, 6)\n", 468 | "a, b, c = tup" 469 | ] 470 | }, 471 | { 472 | "cell_type": "code", 473 | "execution_count": 9, 474 | "metadata": {}, 475 | "outputs": [ 476 | { 477 | "data": { 478 | "text/plain": [ 479 | "5" 480 | ] 481 | }, 482 | "execution_count": 9, 483 | "metadata": {}, 484 | "output_type": "execute_result" 485 | } 486 | ], 487 | "source": [ 488 | "b" 489 | ] 490 | }, 491 | { 492 | "cell_type": "code", 493 | "execution_count": 11, 494 | "metadata": {}, 495 | "outputs": [ 496 | { 497 | "name": "stdout", 498 | "output_type": "stream", 499 | "text": [ 500 | "1\n", 501 | "4\n", 502 | "7\n" 503 | ] 504 | } 505 | ], 506 | "source": [ 507 | "seq = [(1, 2, 3), (4, 5, 6), (7, 8, 9)]\n", 508 | "for i in seq:\n", 509 | " print(i[0])\n", 510 | " #print(i)" 511 | ] 512 | }, 513 | { 514 | "cell_type": "code", 515 | "execution_count": 120, 516 | "metadata": {}, 517 | "outputs": [ 518 | { 519 | "name": "stdout", 520 | "output_type": "stream", 521 | "text": [ 522 | "a=1, b=2, c=3\n", 523 | "a=4, b=5, c=6\n", 524 | "a=7, b=8, c=9\n" 525 | ] 526 | } 527 | ], 528 | "source": [ 529 | "seq = [(1, 2, 3), (4, 5, 6), (7, 8, 9)]\n", 530 | "for a,b,c in seq:\n", 531 | " print('a={0}, b={1}, c={2}'.format(a, b, c))" 532 | ] 533 | }, 534 | { 535 | "cell_type": "code", 536 | "execution_count": 12, 537 | "metadata": {}, 538 | "outputs": [ 539 | { 540 | "data": { 541 | "text/plain": [ 542 | "[3, 4, 5]" 543 | ] 544 | }, 545 | "execution_count": 12, 546 | "metadata": {}, 547 | "output_type": "execute_result" 548 | } 549 | ], 550 | "source": [ 551 | "values = 1, 2, 3, 4, 5\n", 552 | "a, b, *remain = values\n", 553 | "a, b\n", 554 | "remain # remaining member after a and b, return as list assigned in variable rest" 555 | ] 556 | }, 557 | { 558 | "cell_type": "markdown", 559 | "metadata": {}, 560 | "source": [ 561 | "#### Tuple methods" 562 | ] 563 | }, 564 | { 565 | "cell_type": "code", 566 | "execution_count": 158, 567 | "metadata": {}, 568 | "outputs": [ 569 | { 570 | "data": { 571 | "text/plain": [ 572 | "4" 573 | ] 574 | }, 575 | "execution_count": 158, 576 | "metadata": {}, 577 | "output_type": "execute_result" 578 | } 579 | ], 580 | "source": [ 581 | "a = (1, 2, 2, 2, 3, 4, 2)\n", 582 | "a.count(2)" 583 | ] 584 | }, 585 | { 586 | "cell_type": "code", 587 | "execution_count": 134, 588 | "metadata": {}, 589 | "outputs": [ 590 | { 591 | "data": { 592 | "text/plain": [ 593 | "16" 594 | ] 595 | }, 596 | "execution_count": 134, 597 | "metadata": {}, 598 | "output_type": "execute_result" 599 | } 600 | ], 601 | "source": [ 602 | "sum(a)" 603 | ] 604 | }, 605 | { 606 | "cell_type": "code", 607 | "execution_count": 33, 608 | "metadata": {}, 609 | "outputs": [ 610 | { 611 | "data": { 612 | "text/plain": [ 613 | "7" 614 | ] 615 | }, 616 | "execution_count": 33, 617 | "metadata": {}, 618 | "output_type": "execute_result" 619 | } 620 | ], 621 | "source": [ 622 | "len(a)" 623 | ] 624 | }, 625 | { 626 | "cell_type": "markdown", 627 | "metadata": {}, 628 | "source": [ 629 | "### List" 630 | ] 631 | }, 632 | { 633 | "cell_type": "code", 634 | "execution_count": 132, 635 | "metadata": {}, 636 | "outputs": [ 637 | { 638 | "data": { 639 | "text/plain": [ 640 | "[2, 3, 7, 'None']" 641 | ] 642 | }, 643 | "execution_count": 132, 644 | "metadata": {}, 645 | "output_type": "execute_result" 646 | } 647 | ], 648 | "source": [ 649 | "a1 = [2, 3, 7, 'None']\n", 650 | "a1" 651 | ] 652 | }, 653 | { 654 | "cell_type": "code", 655 | "execution_count": null, 656 | "metadata": {}, 657 | "outputs": [], 658 | "source": [] 659 | }, 660 | { 661 | "cell_type": "code", 662 | "execution_count": 21, 663 | "metadata": {}, 664 | "outputs": [ 665 | { 666 | "data": { 667 | "text/plain": [ 668 | "['full', 'half', 'quarter']" 669 | ] 670 | }, 671 | "execution_count": 21, 672 | "metadata": {}, 673 | "output_type": "execute_result" 674 | } 675 | ], 676 | "source": [ 677 | "tup = ('full', 'half', 'quarter')\n", 678 | "b = list(tup)\n", 679 | "b" 680 | ] 681 | }, 682 | { 683 | "cell_type": "code", 684 | "execution_count": 22, 685 | "metadata": {}, 686 | "outputs": [ 687 | { 688 | "data": { 689 | "text/plain": [ 690 | "[\"can't handle\", 'half', 'quarter']" 691 | ] 692 | }, 693 | "execution_count": 22, 694 | "metadata": {}, 695 | "output_type": "execute_result" 696 | } 697 | ], 698 | "source": [ 699 | "b[0] = \"can't handle\" ## List is mutable\n", 700 | "b" 701 | ] 702 | }, 703 | { 704 | "cell_type": "code", 705 | "execution_count": 13, 706 | "metadata": {}, 707 | "outputs": [ 708 | { 709 | "data": { 710 | "text/plain": [ 711 | "range(0, 10)" 712 | ] 713 | }, 714 | "execution_count": 13, 715 | "metadata": {}, 716 | "output_type": "execute_result" 717 | } 718 | ], 719 | "source": [ 720 | "range(10)" 721 | ] 722 | }, 723 | { 724 | "cell_type": "code", 725 | "execution_count": 140, 726 | "metadata": {}, 727 | "outputs": [ 728 | { 729 | "data": { 730 | "text/plain": [ 731 | "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]" 732 | ] 733 | }, 734 | "execution_count": 140, 735 | "metadata": {}, 736 | "output_type": "execute_result" 737 | } 738 | ], 739 | "source": [ 740 | "g = range(10)\n", 741 | "g\n", 742 | "list(g)" 743 | ] 744 | }, 745 | { 746 | "cell_type": "markdown", 747 | "metadata": {}, 748 | "source": [ 749 | "### Adding and removing elements" 750 | ] 751 | }, 752 | { 753 | "cell_type": "code", 754 | "execution_count": 23, 755 | "metadata": {}, 756 | "outputs": [ 757 | { 758 | "data": { 759 | "text/plain": [ 760 | "[\"can't handle\", 'half', 'quarter', \"Teacher's\"]" 761 | ] 762 | }, 763 | "execution_count": 23, 764 | "metadata": {}, 765 | "output_type": "execute_result" 766 | } 767 | ], 768 | "source": [ 769 | "b.append(\"Teacher's\")\n", 770 | "b" 771 | ] 772 | }, 773 | { 774 | "cell_type": "code", 775 | "execution_count": 24, 776 | "metadata": {}, 777 | "outputs": [ 778 | { 779 | "data": { 780 | "text/plain": [ 781 | "[\"can't handle\", 'red label', 'half', 'quarter', \"Teacher's\"]" 782 | ] 783 | }, 784 | "execution_count": 24, 785 | "metadata": {}, 786 | "output_type": "execute_result" 787 | } 788 | ], 789 | "source": [ 790 | "b.insert(1, 'red label')\n", 791 | "b" 792 | ] 793 | }, 794 | { 795 | "cell_type": "code", 796 | "execution_count": 25, 797 | "metadata": {}, 798 | "outputs": [ 799 | { 800 | "data": { 801 | "text/plain": [ 802 | "[\"can't handle\", 'red label', 'quarter', \"Teacher's\"]" 803 | ] 804 | }, 805 | "execution_count": 25, 806 | "metadata": {}, 807 | "output_type": "execute_result" 808 | } 809 | ], 810 | "source": [ 811 | "b.pop(2)\n", 812 | "b" 813 | ] 814 | }, 815 | { 816 | "cell_type": "code", 817 | "execution_count": 26, 818 | "metadata": {}, 819 | "outputs": [ 820 | { 821 | "data": { 822 | "text/plain": [ 823 | "[\"can't handle\", 'red label', 'quarter', \"Teacher's\", 'like']" 824 | ] 825 | }, 826 | "execution_count": 26, 827 | "metadata": {}, 828 | "output_type": "execute_result" 829 | } 830 | ], 831 | "source": [ 832 | "b.append('like')\n", 833 | "b" 834 | ] 835 | }, 836 | { 837 | "cell_type": "code", 838 | "execution_count": 27, 839 | "metadata": {}, 840 | "outputs": [ 841 | { 842 | "data": { 843 | "text/plain": [ 844 | "[\"can't handle\", 'red label', 'quarter', \"Teacher's\"]" 845 | ] 846 | }, 847 | "execution_count": 27, 848 | "metadata": {}, 849 | "output_type": "execute_result" 850 | } 851 | ], 852 | "source": [ 853 | "b.remove('like')\n", 854 | "b" 855 | ] 856 | }, 857 | { 858 | "cell_type": "code", 859 | "execution_count": 60, 860 | "metadata": {}, 861 | "outputs": [ 862 | { 863 | "data": { 864 | "text/plain": [ 865 | "True" 866 | ] 867 | }, 868 | "execution_count": 60, 869 | "metadata": {}, 870 | "output_type": "execute_result" 871 | } 872 | ], 873 | "source": [ 874 | "'red label' in b" 875 | ] 876 | }, 877 | { 878 | "cell_type": "code", 879 | "execution_count": 61, 880 | "metadata": {}, 881 | "outputs": [ 882 | { 883 | "data": { 884 | "text/plain": [ 885 | "True" 886 | ] 887 | }, 888 | "execution_count": 61, 889 | "metadata": {}, 890 | "output_type": "execute_result" 891 | } 892 | ], 893 | "source": [ 894 | "'like' not in b_list" 895 | ] 896 | }, 897 | { 898 | "cell_type": "markdown", 899 | "metadata": {}, 900 | "source": [ 901 | "### Concatenating and combining lists" 902 | ] 903 | }, 904 | { 905 | "cell_type": "code", 906 | "execution_count": 44, 907 | "metadata": {}, 908 | "outputs": [ 909 | { 910 | "data": { 911 | "text/plain": [ 912 | "[4, None, 'foo', 7, 8, (2, 3)]" 913 | ] 914 | }, 915 | "execution_count": 44, 916 | "metadata": {}, 917 | "output_type": "execute_result" 918 | } 919 | ], 920 | "source": [ 921 | "[4, None, 'foo'] + [7, 8, (2, 3)]" 922 | ] 923 | }, 924 | { 925 | "cell_type": "code", 926 | "execution_count": 46, 927 | "metadata": {}, 928 | "outputs": [ 929 | { 930 | "data": { 931 | "text/plain": [ 932 | "[4, None, 'ful', 7, 8, (2, 3)]" 933 | ] 934 | }, 935 | "execution_count": 46, 936 | "metadata": {}, 937 | "output_type": "execute_result" 938 | } 939 | ], 940 | "source": [ 941 | "x = [4, None, 'ful']\n", 942 | "x.extend([7, 8, (2, 3)]) ## Same as adding\n", 943 | "x" 944 | ] 945 | }, 946 | { 947 | "cell_type": "markdown", 948 | "metadata": {}, 949 | "source": [ 950 | "#### Sorting" 951 | ] 952 | }, 953 | { 954 | "cell_type": "code", 955 | "execution_count": 62, 956 | "metadata": {}, 957 | "outputs": [ 958 | { 959 | "data": { 960 | "text/plain": [ 961 | "[1, 2, 3, 5, 7]" 962 | ] 963 | }, 964 | "execution_count": 62, 965 | "metadata": {}, 966 | "output_type": "execute_result" 967 | } 968 | ], 969 | "source": [ 970 | "a = [7, 2, 5, 1, 3]\n", 971 | "a.sort()\n", 972 | "a" 973 | ] 974 | }, 975 | { 976 | "cell_type": "code", 977 | "execution_count": 144, 978 | "metadata": {}, 979 | "outputs": [ 980 | { 981 | "data": { 982 | "text/plain": [ 983 | "['He', 'foxes', 'saw', 'six', 'small']" 984 | ] 985 | }, 986 | "execution_count": 144, 987 | "metadata": {}, 988 | "output_type": "execute_result" 989 | } 990 | ], 991 | "source": [ 992 | "b = ['saw', 'small', 'He', 'foxes', 'six']\n", 993 | "b.sort()# sort in alphabetical order\n", 994 | "b" 995 | ] 996 | }, 997 | { 998 | "cell_type": "code", 999 | "execution_count": 143, 1000 | "metadata": {}, 1001 | "outputs": [ 1002 | { 1003 | "data": { 1004 | "text/plain": [ 1005 | "['He', 'saw', 'six', 'small', 'foxes']" 1006 | ] 1007 | }, 1008 | "execution_count": 143, 1009 | "metadata": {}, 1010 | "output_type": "execute_result" 1011 | } 1012 | ], 1013 | "source": [ 1014 | "b = ['saw', 'small', 'He', 'foxes', 'six']\n", 1015 | "b.sort(key=len) ## Sort according to lenth of each elements\n", 1016 | "b" 1017 | ] 1018 | }, 1019 | { 1020 | "cell_type": "markdown", 1021 | "metadata": {}, 1022 | "source": [ 1023 | "#### Slicing" 1024 | ] 1025 | }, 1026 | { 1027 | "cell_type": "code", 1028 | "execution_count": 42, 1029 | "metadata": {}, 1030 | "outputs": [ 1031 | { 1032 | "data": { 1033 | "text/plain": [ 1034 | "[2, 3, 7, 5]" 1035 | ] 1036 | }, 1037 | "execution_count": 42, 1038 | "metadata": {}, 1039 | "output_type": "execute_result" 1040 | } 1041 | ], 1042 | "source": [ 1043 | "set1 = [7, 2, 3, 7, 5, 6, 0, 1]\n", 1044 | "set1[1:5]" 1045 | ] 1046 | }, 1047 | { 1048 | "cell_type": "code", 1049 | "execution_count": 43, 1050 | "metadata": {}, 1051 | "outputs": [ 1052 | { 1053 | "data": { 1054 | "text/plain": [ 1055 | "[7, 2, 3, 6, 3, 6, 0, 1]" 1056 | ] 1057 | }, 1058 | "execution_count": 43, 1059 | "metadata": {}, 1060 | "output_type": "execute_result" 1061 | } 1062 | ], 1063 | "source": [ 1064 | "set1[3:5] = [6,3]\n", 1065 | "set1" 1066 | ] 1067 | }, 1068 | { 1069 | "cell_type": "code", 1070 | "execution_count": 39, 1071 | "metadata": {}, 1072 | "outputs": [ 1073 | { 1074 | "data": { 1075 | "text/plain": [ 1076 | "[7, 2, 3, 6, 3, 3, 6, 0, 1]" 1077 | ] 1078 | }, 1079 | "execution_count": 39, 1080 | "metadata": {}, 1081 | "output_type": "execute_result" 1082 | } 1083 | ], 1084 | "source": [ 1085 | "#set1[3:4] = [6,3]\n", 1086 | "#set1 ### What is happening check yourself?" 1087 | ] 1088 | }, 1089 | { 1090 | "cell_type": "code", 1091 | "execution_count": 44, 1092 | "metadata": {}, 1093 | "outputs": [ 1094 | { 1095 | "data": { 1096 | "text/plain": [ 1097 | "[7, 2, 3, 6, 3]" 1098 | ] 1099 | }, 1100 | "execution_count": 44, 1101 | "metadata": {}, 1102 | "output_type": "execute_result" 1103 | } 1104 | ], 1105 | "source": [ 1106 | "set1[:5]" 1107 | ] 1108 | }, 1109 | { 1110 | "cell_type": "code", 1111 | "execution_count": 45, 1112 | "metadata": {}, 1113 | "outputs": [ 1114 | { 1115 | "data": { 1116 | "text/plain": [ 1117 | "[6, 3, 6, 0, 1]" 1118 | ] 1119 | }, 1120 | "execution_count": 45, 1121 | "metadata": {}, 1122 | "output_type": "execute_result" 1123 | } 1124 | ], 1125 | "source": [ 1126 | "set1[3:]" 1127 | ] 1128 | }, 1129 | { 1130 | "cell_type": "code", 1131 | "execution_count": 68, 1132 | "metadata": {}, 1133 | "outputs": [ 1134 | { 1135 | "data": { 1136 | "text/plain": [ 1137 | "[5, 6, 0, 1]" 1138 | ] 1139 | }, 1140 | "execution_count": 68, 1141 | "metadata": {}, 1142 | "output_type": "execute_result" 1143 | } 1144 | ], 1145 | "source": [ 1146 | "set1[-4:]" 1147 | ] 1148 | }, 1149 | { 1150 | "cell_type": "code", 1151 | "execution_count": 69, 1152 | "metadata": {}, 1153 | "outputs": [ 1154 | { 1155 | "data": { 1156 | "text/plain": [ 1157 | "[6, 3, 5, 6]" 1158 | ] 1159 | }, 1160 | "execution_count": 69, 1161 | "metadata": {}, 1162 | "output_type": "execute_result" 1163 | } 1164 | ], 1165 | "source": [ 1166 | "set1[-6:-2]" 1167 | ] 1168 | }, 1169 | { 1170 | "cell_type": "code", 1171 | "execution_count": 157, 1172 | "metadata": {}, 1173 | "outputs": [ 1174 | { 1175 | "data": { 1176 | "text/plain": [ 1177 | "['foo', 'bar', 'baz']" 1178 | ] 1179 | }, 1180 | "execution_count": 157, 1181 | "metadata": {}, 1182 | "output_type": "execute_result" 1183 | } 1184 | ], 1185 | "source": [ 1186 | "set1" 1187 | ] 1188 | }, 1189 | { 1190 | "cell_type": "code", 1191 | "execution_count": null, 1192 | "metadata": {}, 1193 | "outputs": [], 1194 | "source": [] 1195 | }, 1196 | { 1197 | "cell_type": "code", 1198 | "execution_count": 147, 1199 | "metadata": {}, 1200 | "outputs": [ 1201 | { 1202 | "data": { 1203 | "text/plain": [ 1204 | "[7, 3, 5, 0]" 1205 | ] 1206 | }, 1207 | "execution_count": 147, 1208 | "metadata": {}, 1209 | "output_type": "execute_result" 1210 | } 1211 | ], 1212 | "source": [ 1213 | "set1[::2] ## Be careful !! What is happening here?" 1214 | ] 1215 | }, 1216 | { 1217 | "cell_type": "code", 1218 | "execution_count": 71, 1219 | "metadata": {}, 1220 | "outputs": [ 1221 | { 1222 | "data": { 1223 | "text/plain": [ 1224 | "[1, 0, 6, 5, 3, 6, 3, 2, 7]" 1225 | ] 1226 | }, 1227 | "execution_count": 71, 1228 | "metadata": {}, 1229 | "output_type": "execute_result" 1230 | } 1231 | ], 1232 | "source": [ 1233 | "set1[::-1]## such beutiful code! Wow!!" 1234 | ] 1235 | }, 1236 | { 1237 | "cell_type": "markdown", 1238 | "metadata": {}, 1239 | "source": [ 1240 | "### zip" 1241 | ] 1242 | }, 1243 | { 1244 | "cell_type": "code", 1245 | "execution_count": 46, 1246 | "metadata": {}, 1247 | "outputs": [ 1248 | { 1249 | "data": { 1250 | "text/plain": [ 1251 | "[('foo', 'one'), ('bar', 'two'), ('baz', 'three')]" 1252 | ] 1253 | }, 1254 | "execution_count": 46, 1255 | "metadata": {}, 1256 | "output_type": "execute_result" 1257 | } 1258 | ], 1259 | "source": [ 1260 | "set1 = ['foo', 'bar', 'baz']\n", 1261 | "set2 = ['one', 'two', 'three']\n", 1262 | "zipped = zip(set1, set2)\n", 1263 | "list(zipped)" 1264 | ] 1265 | }, 1266 | { 1267 | "cell_type": "code", 1268 | "execution_count": 47, 1269 | "metadata": {}, 1270 | "outputs": [ 1271 | { 1272 | "data": { 1273 | "text/plain": [ 1274 | "" 1275 | ] 1276 | }, 1277 | "execution_count": 47, 1278 | "metadata": {}, 1279 | "output_type": "execute_result" 1280 | } 1281 | ], 1282 | "source": [ 1283 | "zipped" 1284 | ] 1285 | }, 1286 | { 1287 | "cell_type": "markdown", 1288 | "metadata": {}, 1289 | "source": [ 1290 | "#### reversed" 1291 | ] 1292 | }, 1293 | { 1294 | "cell_type": "code", 1295 | "execution_count": 48, 1296 | "metadata": {}, 1297 | "outputs": [ 1298 | { 1299 | "data": { 1300 | "text/plain": [ 1301 | "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]" 1302 | ] 1303 | }, 1304 | "execution_count": 48, 1305 | "metadata": {}, 1306 | "output_type": "execute_result" 1307 | } 1308 | ], 1309 | "source": [ 1310 | "list(range(10))" 1311 | ] 1312 | }, 1313 | { 1314 | "cell_type": "code", 1315 | "execution_count": 74, 1316 | "metadata": {}, 1317 | "outputs": [ 1318 | { 1319 | "data": { 1320 | "text/plain": [ 1321 | "[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]" 1322 | ] 1323 | }, 1324 | "execution_count": 74, 1325 | "metadata": {}, 1326 | "output_type": "execute_result" 1327 | } 1328 | ], 1329 | "source": [ 1330 | "list(reversed(range(10)))" 1331 | ] 1332 | }, 1333 | { 1334 | "cell_type": "markdown", 1335 | "metadata": {}, 1336 | "source": [ 1337 | "### dict" 1338 | ] 1339 | }, 1340 | { 1341 | "cell_type": "code", 1342 | "execution_count": 51, 1343 | "metadata": {}, 1344 | "outputs": [ 1345 | { 1346 | "data": { 1347 | "text/plain": [ 1348 | "{'a': 'some value', 'b': [1, 2, 3, 4], 'c': 999}" 1349 | ] 1350 | }, 1351 | "execution_count": 51, 1352 | "metadata": {}, 1353 | "output_type": "execute_result" 1354 | } 1355 | ], 1356 | "source": [ 1357 | "#empty_dict = {}\n", 1358 | "d1 = {'a' : 'some value', 'b' : [1, 2, 3, 4],'c':999}\n", 1359 | "d1" 1360 | ] 1361 | }, 1362 | { 1363 | "cell_type": "code", 1364 | "execution_count": 52, 1365 | "metadata": {}, 1366 | "outputs": [ 1367 | { 1368 | "data": { 1369 | "text/plain": [ 1370 | "[1, 2, 3, 4]" 1371 | ] 1372 | }, 1373 | "execution_count": 52, 1374 | "metadata": {}, 1375 | "output_type": "execute_result" 1376 | } 1377 | ], 1378 | "source": [ 1379 | "d1['b']" 1380 | ] 1381 | }, 1382 | { 1383 | "cell_type": "code", 1384 | "execution_count": 53, 1385 | "metadata": {}, 1386 | "outputs": [ 1387 | { 1388 | "data": { 1389 | "text/plain": [ 1390 | "'some value'" 1391 | ] 1392 | }, 1393 | "execution_count": 53, 1394 | "metadata": {}, 1395 | "output_type": "execute_result" 1396 | } 1397 | ], 1398 | "source": [ 1399 | "d1['a']" 1400 | ] 1401 | }, 1402 | { 1403 | "cell_type": "code", 1404 | "execution_count": 54, 1405 | "metadata": {}, 1406 | "outputs": [ 1407 | { 1408 | "data": { 1409 | "text/plain": [ 1410 | "{'a': 'some value', 'b': [1, 2, 3, 4], 'c': 999, 7: 'an integer'}" 1411 | ] 1412 | }, 1413 | "execution_count": 54, 1414 | "metadata": {}, 1415 | "output_type": "execute_result" 1416 | } 1417 | ], 1418 | "source": [ 1419 | "d1[7] = 'an integer'\n", 1420 | "d1" 1421 | ] 1422 | }, 1423 | { 1424 | "cell_type": "code", 1425 | "execution_count": 79, 1426 | "metadata": {}, 1427 | "outputs": [ 1428 | { 1429 | "data": { 1430 | "text/plain": [ 1431 | "[1, 2, 3, 4]" 1432 | ] 1433 | }, 1434 | "execution_count": 79, 1435 | "metadata": {}, 1436 | "output_type": "execute_result" 1437 | } 1438 | ], 1439 | "source": [ 1440 | "d1\n", 1441 | "d1['b']" 1442 | ] 1443 | }, 1444 | { 1445 | "cell_type": "code", 1446 | "execution_count": 80, 1447 | "metadata": {}, 1448 | "outputs": [ 1449 | { 1450 | "data": { 1451 | "text/plain": [ 1452 | "True" 1453 | ] 1454 | }, 1455 | "execution_count": 80, 1456 | "metadata": {}, 1457 | "output_type": "execute_result" 1458 | } 1459 | ], 1460 | "source": [ 1461 | "'b' in d1" 1462 | ] 1463 | }, 1464 | { 1465 | "cell_type": "code", 1466 | "execution_count": 81, 1467 | "metadata": {}, 1468 | "outputs": [ 1469 | { 1470 | "data": { 1471 | "text/plain": [ 1472 | "{'a': 'some value', 'b': [1, 2, 3, 4], 7: 'an integer', 5: 'some value'}" 1473 | ] 1474 | }, 1475 | "execution_count": 81, 1476 | "metadata": {}, 1477 | "output_type": "execute_result" 1478 | } 1479 | ], 1480 | "source": [ 1481 | "d1[5] = 'some value'\n", 1482 | "d1" 1483 | ] 1484 | }, 1485 | { 1486 | "cell_type": "code", 1487 | "execution_count": 55, 1488 | "metadata": {}, 1489 | "outputs": [ 1490 | { 1491 | "data": { 1492 | "text/plain": [ 1493 | "{'a': 'some value',\n", 1494 | " 'b': [1, 2, 3, 4],\n", 1495 | " 'c': 999,\n", 1496 | " 7: 'an integer',\n", 1497 | " 'dummy': 'another value'}" 1498 | ] 1499 | }, 1500 | "execution_count": 55, 1501 | "metadata": {}, 1502 | "output_type": "execute_result" 1503 | } 1504 | ], 1505 | "source": [ 1506 | "d1['dummy'] = 'another value'\n", 1507 | "d1" 1508 | ] 1509 | }, 1510 | { 1511 | "cell_type": "code", 1512 | "execution_count": 56, 1513 | "metadata": {}, 1514 | "outputs": [ 1515 | { 1516 | "data": { 1517 | "text/plain": [ 1518 | "{'a': 'some value', 'b': [1, 2, 3, 4], 'c': 999, 'dummy': 'another value'}" 1519 | ] 1520 | }, 1521 | "execution_count": 56, 1522 | "metadata": {}, 1523 | "output_type": "execute_result" 1524 | } 1525 | ], 1526 | "source": [ 1527 | "del d1[7]\n", 1528 | "d1" 1529 | ] 1530 | }, 1531 | { 1532 | "cell_type": "code", 1533 | "execution_count": 57, 1534 | "metadata": {}, 1535 | "outputs": [ 1536 | { 1537 | "data": { 1538 | "text/plain": [ 1539 | "'another value'" 1540 | ] 1541 | }, 1542 | "execution_count": 57, 1543 | "metadata": {}, 1544 | "output_type": "execute_result" 1545 | } 1546 | ], 1547 | "source": [ 1548 | "ret = d1.pop('dummy')\n", 1549 | "ret ## It gives the member which is removed\n", 1550 | "#d1" 1551 | ] 1552 | }, 1553 | { 1554 | "cell_type": "code", 1555 | "execution_count": 58, 1556 | "metadata": {}, 1557 | "outputs": [ 1558 | { 1559 | "data": { 1560 | "text/plain": [ 1561 | "{'a': 'some value', 'b': [1, 2, 3, 4], 'c': 999}" 1562 | ] 1563 | }, 1564 | "execution_count": 58, 1565 | "metadata": {}, 1566 | "output_type": "execute_result" 1567 | } 1568 | ], 1569 | "source": [ 1570 | "d1" 1571 | ] 1572 | }, 1573 | { 1574 | "cell_type": "code", 1575 | "execution_count": 154, 1576 | "metadata": {}, 1577 | "outputs": [ 1578 | { 1579 | "data": { 1580 | "text/plain": [ 1581 | "'another value'" 1582 | ] 1583 | }, 1584 | "execution_count": 154, 1585 | "metadata": {}, 1586 | "output_type": "execute_result" 1587 | } 1588 | ], 1589 | "source": [ 1590 | "ret" 1591 | ] 1592 | }, 1593 | { 1594 | "cell_type": "code", 1595 | "execution_count": 59, 1596 | "metadata": {}, 1597 | "outputs": [ 1598 | { 1599 | "data": { 1600 | "text/plain": [ 1601 | "dict_keys(['a', 'b', 'c'])" 1602 | ] 1603 | }, 1604 | "execution_count": 59, 1605 | "metadata": {}, 1606 | "output_type": "execute_result" 1607 | } 1608 | ], 1609 | "source": [ 1610 | "d1.keys()" 1611 | ] 1612 | }, 1613 | { 1614 | "cell_type": "code", 1615 | "execution_count": 60, 1616 | "metadata": {}, 1617 | "outputs": [ 1618 | { 1619 | "data": { 1620 | "text/plain": [ 1621 | "dict_values(['some value', [1, 2, 3, 4], 999])" 1622 | ] 1623 | }, 1624 | "execution_count": 60, 1625 | "metadata": {}, 1626 | "output_type": "execute_result" 1627 | } 1628 | ], 1629 | "source": [ 1630 | "d1.values()" 1631 | ] 1632 | }, 1633 | { 1634 | "cell_type": "code", 1635 | "execution_count": 61, 1636 | "metadata": {}, 1637 | "outputs": [ 1638 | { 1639 | "data": { 1640 | "text/plain": [ 1641 | "['a', 'b', 'c']" 1642 | ] 1643 | }, 1644 | "execution_count": 61, 1645 | "metadata": {}, 1646 | "output_type": "execute_result" 1647 | } 1648 | ], 1649 | "source": [ 1650 | "list(d1.keys())\n" 1651 | ] 1652 | }, 1653 | { 1654 | "cell_type": "code", 1655 | "execution_count": 62, 1656 | "metadata": {}, 1657 | "outputs": [ 1658 | { 1659 | "data": { 1660 | "text/plain": [ 1661 | "['some value', [1, 2, 3, 4], 999]" 1662 | ] 1663 | }, 1664 | "execution_count": 62, 1665 | "metadata": {}, 1666 | "output_type": "execute_result" 1667 | } 1668 | ], 1669 | "source": [ 1670 | "list(d1.values())" 1671 | ] 1672 | }, 1673 | { 1674 | "cell_type": "markdown", 1675 | "metadata": {}, 1676 | "source": [ 1677 | "#### Anonymous (Lambda) Functions\n", 1678 | "\n", 1679 | "def sqr(x): \n", 1680 | "return x ** 2\n", 1681 | " \n", 1682 | "##### sqr = lambda x: x **2\n" 1683 | ] 1684 | }, 1685 | { 1686 | "cell_type": "code", 1687 | "execution_count": 1, 1688 | "metadata": {}, 1689 | "outputs": [], 1690 | "source": [ 1691 | "f=lambda x:x**2" 1692 | ] 1693 | }, 1694 | { 1695 | "cell_type": "code", 1696 | "execution_count": 2, 1697 | "metadata": {}, 1698 | "outputs": [ 1699 | { 1700 | "data": { 1701 | "text/plain": [ 1702 | "81" 1703 | ] 1704 | }, 1705 | "execution_count": 2, 1706 | "metadata": {}, 1707 | "output_type": "execute_result" 1708 | } 1709 | ], 1710 | "source": [ 1711 | "f(9)" 1712 | ] 1713 | }, 1714 | { 1715 | "cell_type": "markdown", 1716 | "metadata": {}, 1717 | "source": [ 1718 | "#### Thanks! This much for this module. \n", 1719 | "#### Don't forget to follow me for more such stuff.\n", 1720 | "* https://www.linkedin.com/in/ramendra-kumar-57334478/\n", 1721 | "* https://github.com/Rami-RK\n", 1722 | "\n", 1723 | "#### Feel free to share." 1724 | ] 1725 | } 1726 | ], 1727 | "metadata": { 1728 | "kernelspec": { 1729 | "display_name": "Python 3", 1730 | "language": "python", 1731 | "name": "python3" 1732 | }, 1733 | "language_info": { 1734 | "codemirror_mode": { 1735 | "name": "ipython", 1736 | "version": 3 1737 | }, 1738 | "file_extension": ".py", 1739 | "mimetype": "text/x-python", 1740 | "name": "python", 1741 | "nbconvert_exporter": "python", 1742 | "pygments_lexer": "ipython3", 1743 | "version": "3.7.1" 1744 | } 1745 | }, 1746 | "nbformat": 4, 1747 | "nbformat_minor": 2 1748 | } 1749 | -------------------------------------------------------------------------------- /BTU.csv: -------------------------------------------------------------------------------- 1 | Device Name,Date,Temperature (DegC),,Flow Rate (USGPM),TR 2 | ,,CHWR,CHWS,Flow,Load 3 | BTU-1,2/17/2017 23:55,21.8,18.69,96,22 4 | BTU-2,2/17/2017 23:55,23.35,18.79,86.1,29 5 | BTU-1,2/17/2017 23:50,22.83,19.57,93.5,22.5 6 | BTU-2,2/17/2017 23:50,23.32,19.45,81.5,23.2 7 | BTU-1,2/17/2017 23:45,22.79,19.4,98,24.5 8 | BTU-2,2/17/2017 23:45,22.97,19.39,85.3,22.5 9 | BTU-1,2/17/2017 23:40,21.51,19.45,100.8,15.3 10 | BTU-2,2/17/2017 23:40,22.5,19.51,86.1,19 11 | BTU-1,2/17/2017 23:35,22.54,19.04,134.5,34.7 12 | BTU-2,2/17/2017 23:35,23.43,,115.7,40.4 13 | BTU-1,2/17/2017 23:30,22.74,19.45,94.3,22.9 14 | BTU-2,2/17/2017 23:30,23.45,19.6,82.8,23.5 15 | BTU-1,2/17/2017 23:25,22.6,19.77,94.2,19.6 16 | BTU-2,2/17/2017 23:25,23.07,19.75,82.3,20.1 17 | BTU-1,2/17/2017 23:20,22.28,18.86,93.8,23.6 18 | BTU-2,2/17/2017 23:20,23.19,19,82,25.3 19 | BTU-1,2/17/2017 23:15,22.45,19.25,93.1,22 20 | BTU-2,2/17/2017 23:15,23.14,19.21,82.8,23.9 21 | BTU-1,2/17/2017 23:10,22.81,hjkhk,95.5,28.3 22 | BTU-2,2/17/2017 23:10,23.51,18.79,82,28.5 23 | BTU-1,2/17/2017 23:05,22.97,19.6,94.3,23.4 24 | BTU-2,2/17/2017 23:05,23.54,19.61,82.5,23.9 25 | BTU-1,2/17/2017 23:00,22.88,19.77,93.4,21.4 26 | BTU-2,2/17/2017 23:00,23.11,19.66,82.4,21 27 | BTU-1,2/17/2017 22:55,22.31,18.92,96,24 28 | BTU-2,2/17/2017 22:55,23.11,19.07,&,25.2 29 | BTU-1,2/17/2017 22:50,22.43,18.86,95.4,25.1 30 | BTU-2,2/17/2017 22:50,23.55,19.02,85,28.4 31 | BTU-1,2/17/2017 22:45,23.21,19.67,97.7,25.5 32 | BTU-2,2/17/2017 22:45,23.51,19.7,85.6,24 33 | BTU-1,2/17/2017 22:40,21.57,20.14,100.1,10.5 34 | BTU-2,2/17/2017 22:40,23.02,20.24,##,17.6 35 | BTU-1,2/17/2017 22:35,22.44,19.5,96.3,20.8 36 | BTU-2,2/17/2017 22:35,23.24,19.43,82.5,23.2 37 | BTU-1,2/17/2017 22:30,22.98,18.87,94.1,28.4 38 | BTU-2,2/17/2017 22:30,23.63,19.01,83.1,28.3 39 | BTU-1,2/17/2017 22:25,22.99,19.62,94.2,23.3 40 | BTU-2,2/17/2017 22:25,23.44,19.71,82.8,22.7 41 | BTU-1,2/17/2017 22:20,22.48,19.9,95.7,18.2 42 | BTU-2,2/17/2017 22:20,23.11,,83.1,19.7 43 | BTU-1,2/17/2017 22:15,22.28,18.91,96.1,23.9 44 | BTU-2,2/17/2017 22:15,23.27,19.06,83.7,26 45 | BTU-1,2/17/2017 22:10,22.54,19.04,96.3,24.8 46 | BTU-2,2/17/2017 22:10,23.37,19.14,82.2,25.6 47 | BTU-1,2/17/2017 22:05,22.52,19.25,95.4,23 48 | BTU-2,2/17/2017 22:05,23.4,19.39,82,24.2 49 | BTU-1,2/17/2017 22:00,22.45,19.24,96.7,22.9 50 | BTU-2,2/17/2017 22:00,23.2,19.34,82.3,23.4 51 | BTU-1,2/17/2017 21:55,22.6,19.17,94.6,23.9 52 | BTU-2,2/17/2017 21:55,23.63,19.15,83.2,27.5 53 | BTU-1,2/17/2017 21:50,22.83,19.69,92.3,21.3 54 | BTU-2,2/17/2017 21:50,23.53,19.82,82.5,22.5 55 | BTU-1,2/17/2017 21:45,22.52,20,92.7,17.2 56 | BTU-2,2/17/2017 21:45,23.07,19.98,81.9,18.6 57 | BTU-1,2/17/2017 21:40,22.39,19.06,94.5,23.2 58 | BTU-2,2/17/2017 21:40,23.16,18.95,83.7,25.9 59 | BTU-1,2/17/2017 21:35,22.59,19.25,94.9,23.4 60 | BTU-2,2/17/2017 21:35,23.18,19.19,82.5,24.3 61 | BTU-1,2/17/2017 21:30,22.49,19.24,94.2,22.5 62 | BTU-2,2/17/2017 21:30,23.2,19.32,82,23.4 63 | BTU-1,2/17/2017 21:25,22.46,19.23,96.8,23.1 64 | BTU-2,2/17/2017 21:25,23.16,19.31,83.2,23.6 65 | BTU-1,2/17/2017 21:20,22.31,19.17,95.4,22.1 66 | BTU-2,2/17/2017 21:20,23.44,19.26,83,25.6 67 | BTU-1,2/17/2017 21:15,22.83,19.65,95.5,22.4 68 | BTU-2,2/17/2017 21:15,22.88,19.61,82.7,19.9 69 | BTU-1,2/17/2017 21:10,21.81,19.15,111.5,21.8 70 | BTU-2,2/17/2017 21:10,22.5,19.16,99,24.3 71 | BTU-1,2/17/2017 21:05,21.69,18.81,110.7,23.5 72 | BTU-2,2/17/2017 21:05,22.53,18.79,97.9,27 73 | BTU-1,2/17/2017 21:00,21.72,18.79,111.9,24.1 74 | BTU-2,2/17/2017 21:00,22.64,18.84,96.9,27.1 75 | BTU-1,2/17/2017 20:55,21.85,18.85,111.7, 76 | BTU-2,2/17/2017 20:55,22.64,18.96,98.1,26.5 77 | BTU-1,2/17/2017 20:50,21.6,19.03,110,20.8 78 | BTU-2,2/17/2017 20:50,22.47,19.08,97.8,24.4 79 | BTU-1,2/17/2017 20:45,21.51,19,132.1,24.4 80 | BTU-2,2/17/2017 20:45,22.49,19.1,115.4,28.8 81 | BTU-1,2/17/2017 20:40,21.78,19.21,132,24.9 82 | BTU-2,2/17/2017 20:40,22.53,19.29,116.6,27.8 83 | BTU-1,2/17/2017 20:35,21.11,19.06,127.8,19.3 84 | BTU-2,2/17/2017 20:35,23.19,19.03,111.5,34.2 85 | BTU-1,2/17/2017 20:30,22.84,18.84,94.2,27.8 86 | BTU-2,2/17/2017 20:30,23.36,19.03,82,26.2 87 | BTU-1,2/17/2017 20:25,22.08,19.68,97.4,17.2 88 | BTU-2,2/17/2017 20:25,22.85,19.79,84.7,19.1 89 | BTU-1,2/17/2017 20:20,21.69,19.28,134.6,23.9 90 | BTU-2,2/17/2017 20:20,22.54,19.35,117.3,27.6 91 | BTU-1,2/17/2017 20:15,22.82,18.4,123.3,40.2 92 | BTU-2,2/17/2017 20:15,23.3,18.37,107.3,39 93 | BTU-1,2/17/2017 20:10,22.64,19.26,95.5,23.8 94 | BTU-2,2/17/2017 20:10,23.71,19.29,83.1,27 95 | BTU-1,2/17/2017 20:05,23.25,20.37,94.1,19.9 96 | BTU-2,2/17/2017 20:05,22.93,20.34,82.7,15.8 97 | BTU-1,2/17/2017 20:00,21.79,19.26,133.8,24.5 98 | BTU-2,2/17/2017 20:00,22.61,19.43,115.5,27.1 99 | BTU-1,2/17/2017 19:55,21.62,19.16,131.9,23.9 100 | BTU-2,2/17/2017 19:55,22.48,19.4,115.8,26.3 101 | BTU-1,2/17/2017 19:50,21.72,19.04,129.2,25.4 102 | BTU-2,2/17/2017 19:50,22.57,19.19,116.4,29 103 | BTU-1,2/17/2017 19:45,21.89,19.1,96.4,19.8 104 | BTU-1,2/17/2017 19:40,21.42,19.04,130.9,22.9 105 | BTU-2,2/17/2017 19:40,22.22,18.93,116.9,28.3 106 | BTU-1,2/17/2017 19:35,21.45,18.71,133.4,26.8 107 | BTU-2,2/17/2017 19:35,22.49,18.71,116.5,32.4 108 | BTU-1,2/17/2017 19:30,21.69,18.84,132,27.7 109 | BTU-2,2/17/2017 19:30,22.49,19.26,115,27.4 110 | BTU-1,2/17/2017 19:25,21.24,18.96,125.9,21 111 | BTU-2,2/17/2017 19:25,22.74,18.84,110.1,31.6 112 | BTU-1,2/17/2017 19:20,22.17,18.74,97.2,24.6 113 | BTU-2,2/17/2017 19:20,23,18.69,85.3,27.1 114 | BTU-1,2/17/2017 19:15,22.42,19.81,100.1,19.2 115 | BTU-2,2/17/2017 19:15,22.84,19.78,87.2,19.7 116 | BTU-1,2/17/2017 19:10,21.83,19.12,131.9,26.3 117 | BTU-2,2/17/2017 19:10,22.66,19.49,115.9,27.1 118 | BTU-1,2/17/2017 19:05,21.74,19,96.1,19.4 119 | BTU-2,2/17/2017 19:05,23.19,18.79,84.7,27.5 120 | BTU-1,2/17/2017 19:00,23,19.46,93.7,24.4 121 | BTU-2,2/17/2017 19:00,23.32,19.49,83.8,23.6 122 | BTU-1,2/17/2017 18:55,--,--,--,-- 123 | BTU-2,2/17/2017 18:55,--,--,--,-- 124 | BTU-1,2/17/2017 18:50,21.87,19.2,136,26.8 125 | BTU-2,2/17/2017 18:50,22.71,19.17,115.4,30.1 126 | BTU-1,2/17/2017 18:45,21.63,19.19,109,19.6 127 | BTU-2,2/17/2017 18:45,23.11,19.35,96.8,26.8 128 | BTU-1,2/17/2017 18:40,22.3,19,127.3,31 129 | BTU-1,2/17/2017 18:35,23.23,19.16,94.8,28.4 130 | BTU-2,2/17/2017 18:35,23.55,19.09,81.5,26.8 131 | BTU-1,2/17/2017 18:30,22.51,19.44,99.1,22.4 132 | BTU-2,2/17/2017 18:30,22.95,19.6,85.3,21 133 | BTU-1,2/17/2017 18:25,21.84,19.24,134.2,25.7 134 | BTU-2,2/17/2017 18:25,22.55,19.29,117.4,28.1 135 | BTU-1,2/17/2017 18:20,22.43,18.42,94.3,27.9 136 | BTU-2,2/17/2017 18:20,23.43,18.48,83.9,30.6 137 | BTU-1,2/17/2017 18:15,22.94,19.21,93.6,25.7 138 | BTU-2,2/17/2017 18:15,22.98,19.42,82.5,21.6 139 | BTU-1,2/17/2017 18:10,22.16,19.2,110,23.9 140 | BTU-2,2/17/2017 18:10,22.92,19.2,97.1,26.6 141 | BTU-1,2/17/2017 18:05,21.87,19.15,110.9,22.2 142 | BTU-2,2/17/2017 18:05,22.57,19.18,98,24.5 143 | BTU-1,2/17/2017 18:00,21.59,18.92,127,25 144 | BTU-2,2/17/2017 18:00,22.63,19.07,115.7,30.4 145 | BTU-1,2/17/2017 17:55,21.86,19.09,134.9,27.5 146 | BTU-2,2/17/2017 17:55,22.68,19.23,115.4,29.4 147 | BTU-1,2/17/2017 17:50,21.55,18.95,130.7,24.9 148 | BTU-2,2/17/2017 17:50,22.74,19.18,113.9,29.9 149 | BTU-1,2/17/2017 17:45,22.58,19.19,94,23.5 150 | BTU-2,2/17/2017 17:45,23.35,19.21,82.1,25 151 | BTU-1,2/17/2017 17:40,22.74,18.84,95,27.3 152 | BTU-2,2/17/2017 17:40,23.4,18.9,82.3,27.3 153 | BTU-1,2/17/2017 17:35,22.38,19.1,94.5,22.8 154 | BTU-2,2/17/2017 17:35,23.39,19.24,83,25.4 155 | BTU-1,2/17/2017 17:30,22.66,19.23,110.6,28 156 | BTU-2,2/17/2017 17:30,23.19,19.2,98.6,28.9 157 | BTU-1,2/17/2017 17:25,22.51,19.04,95.6,24.4 158 | BTU-2,2/17/2017 17:25,23.33,19.02,82.3,26.1 159 | BTU-1,2/17/2017 17:20,--,--,--,-- 160 | BTU-2,2/17/2017 17:20,--,--,--,-- 161 | BTU-1,2/17/2017 17:15,22.52,19.04,95.7,24.5 162 | BTU-2,2/17/2017 17:15,23.42,19.11,83.6,26.6 163 | BTU-1,2/17/2017 17:10,22.8,19.52,94.8,22.9 164 | BTU-2,2/17/2017 17:10,23.31,19.43,82.6,23.6 165 | BTU-1,2/17/2017 17:05,22.06,18.79,95.9,23 166 | BTU-2,2/17/2017 17:05,22.98,18.99,81.9,24.1 167 | BTU-1,2/17/2017 17:00,21.79,19.19,134.5,25.8 168 | BTU-2,2/17/2017 17:00,22.64,19.19,116.5,29.6 169 | BTU-1,2/17/2017 16:55,21.64,18.91,133,26.7 170 | BTU-2,2/17/2017 16:55,22.64,19.16,118.3,30.3 171 | BTU-1,2/17/2017 16:50,21.65,19.04,132.1,25.4 172 | BTU-2,2/17/2017 16:50,22.64,19.2,118,29.8 173 | BTU-1,2/17/2017 16:45,22.64,18.94,95.6,26.1 174 | BTU-2,2/17/2017 16:45,23.34,18.85,84.3,27.9 175 | BTU-1,2/17/2017 16:40,22.65,18.95,94.9,25.9 176 | BTU-2,2/17/2017 16:40,23.37,19.11,84.8,26.6 177 | BTU-1,2/17/2017 16:35,22.44,18.95,96.1,24.6 178 | BTU-2,2/17/2017 16:35,23.53,19.11,84.2,27.4 179 | BTU-1,2/17/2017 16:30,22.91,19.5,97.7,24.5 180 | BTU-2,2/17/2017 16:30,23.44,19.62,83.9,23.5 181 | BTU-1,2/17/2017 16:25,22.77,18.94,99.9,28.2 182 | BTU-2,2/17/2017 16:25,23.53,19.01,83,27.6 183 | BTU-1,2/17/2017 16:20,22.73,19.54,95.6,22.5 184 | BTU-2,2/17/2017 16:20,23.5,19.59,83.5,24 185 | BTU-1,2/17/2017 16:15,--,--,--,-- 186 | BTU-2,2/17/2017 16:15,--,--,--,-- 187 | BTU-1,2/17/2017 16:10,22.65,19.58,95,21.5 188 | BTU-2,2/17/2017 16:10,23.56,19.62,82.6,23.9 189 | BTU-1,2/17/2017 16:05,22.69,19.09,93.1,24.7 190 | BTU-2,2/17/2017 16:05,23.61,19.18,83.6,27.3 191 | BTU-1,2/17/2017 16:00,22.6,20.19,91.7,16.2 192 | BTU-2,2/17/2017 16:00,22.96,20.14,82.9,17.2 193 | BTU-1,2/17/2017 15:55,22.01,19.42,131.3,25.1 194 | BTU-2,2/17/2017 15:55,22.74,19.45,115.4,28 195 | BTU-1,2/17/2017 15:50,22.52,18.94,100.4,26.5 196 | BTU-2,2/17/2017 15:50,23.56,19.01,85.9,28.8 197 | BTU-1,2/17/2017 15:45,22.9,19.65,96.5,23.1 198 | BTU-2,2/17/2017 15:45,23.94,19.54,82.5,26.7 199 | BTU-1,2/17/2017 15:40,--,--,--,-- 200 | BTU-2,2/17/2017 15:40,--,--,--,-- 201 | BTU-1,2/17/2017 15:35,22.28,21.01,99.5,9.3 202 | BTU-2,2/17/2017 15:35,22.21,20.89,84.1,8.1 203 | BTU-1,2/17/2017 15:30,21,17.27,100.7,27.7 204 | BTU-2,2/17/2017 15:30,23.28,17.48,85.3,36.5 205 | BTU-1,2/17/2017 15:25,22.84,19.75,120.9,27.5 206 | BTU-2,2/17/2017 15:25,23.48,19.65,105.1,29.7 207 | BTU-1,2/17/2017 15:20,23.27,19.4,105.9,30.2 208 | BTU-2,2/17/2017 15:20,23.35,19.61,92.3,25.4 209 | BTU-1,2/17/2017 15:15,22.16,18.9,104.8,25.2 210 | BTU-2,2/17/2017 15:15,22.99,19.24,92.6,25.6 211 | BTU-1,2/17/2017 15:10,22.34,19.39,99.4,21.6 212 | BTU-2,2/17/2017 15:10,23.18,19.39,89.7,25 213 | BTU-1,2/17/2017 15:05,22.32,19.53,111.3,22.9 214 | BTU-2,2/17/2017 15:05,22.94,19.54,98.2,24.5 215 | BTU-1,2/17/2017 15:00,22.08,19.2,110.9,23.4 216 | BTU-2,2/17/2017 15:00,22.87,19.2,98.1,26.5 217 | BTU-1,2/17/2017 14:55,22.04,19.04,110.3,24.4 218 | BTU-2,2/17/2017 14:55,22.8,19.11,97.7,26.6 219 | BTU-1,2/17/2017 14:50,21.85,19.15,134.2,26.7 220 | BTU-2,2/17/2017 14:50,22.59,19.08,114.1,29.5 221 | BTU-1,2/17/2017 14:45,21.81,19.14,131.7,25.9 222 | BTU-2,2/17/2017 14:45,22.55,19.16,115.3,28.8 223 | BTU-1,2/17/2017 14:40,21.69,19.08,130.9,25.2 224 | BTU-2,2/17/2017 14:40,22.42,19.18,116.4,27.8 225 | BTU-1,2/17/2017 14:35,22.06,18.57,101.1,26 226 | BTU-2,2/17/2017 14:35,22.6,18.62,87.1,25.5 227 | BTU-1,2/17/2017 14:30,21.87,17.95,100.6,29.1 228 | BTU-2,2/17/2017 14:30,23.28,18.06,86.9,33.4 229 | BTU-1,2/17/2017 14:25,22.76,19.51,107.6,25.8 230 | BTU-2,2/17/2017 14:25,23.55,19.45,94.9,28.6 231 | BTU-1,2/17/2017 14:20,23.49,19.26,98.7,30.8 232 | BTU-2,2/17/2017 14:20,23.3,19.29,85.1,25.2 233 | BTU-1,2/17/2017 14:15,22.31,18.84,97.5,24.9 234 | BTU-2,2/17/2017 14:15,23.5,18.99,84.5,28.1 235 | BTU-1,2/17/2017 14:10,23.16,19.66,94.2,24.3 236 | BTU-2,2/17/2017 14:10,23.35,19.56,83.2,23.2 237 | BTU-1,2/17/2017 14:05,21.16,19.67,97.5,10.7 238 | BTU-2,2/17/2017 14:05,23.02,19.76,85.7,20.6 239 | BTU-1,2/17/2017 14:00,21.64,19.16,127.9,23.4 240 | BTU-2,2/17/2017 14:00,22.79,19.45,112.3,27.6 241 | BTU-1,2/17/2017 13:55,22.91,18.99,96,27.7 242 | BTU-2,2/17/2017 13:55,23.54,18.98,84.2,28.3 243 | BTU-1,2/17/2017 13:50,22.93,19.56,96.1,23.9 244 | BTU-2,2/17/2017 13:50,23.24,19.51,82.5,22.7 245 | BTU-1,2/17/2017 13:45,21.98,19.59,99.3,17.5 246 | BTU-2,2/17/2017 13:45,22.58,19.57,86,19 247 | BTU-1,2/17/2017 13:40,21.53,19.11,134,23.9 248 | BTU-2,2/17/2017 13:40,22.77,18.87,117.2,33.7 249 | BTU-1,2/17/2017 13:35,22.64,18.49,101.3,31 250 | BTU-2,2/17/2017 13:35,23.44,18.62,87.4,31.1 251 | BTU-1,2/17/2017 13:30,22.65,19.62,103.8,23.2 252 | BTU-2,2/17/2017 13:30,23.37,19.64,91.8,25.2 253 | BTU-1,2/17/2017 13:25,22.67,19.2,105.1,26.9 254 | BTU-2,2/17/2017 13:25,23.23,19.34,92,26.4 255 | BTU-1,2/17/2017 13:20,22.4,19.2,105.6,24.9 256 | BTU-2,2/17/2017 13:20,23.4,19.27,91.3,27.8 257 | BTU-1,2/17/2017 13:15,22.6,19.58,107.4,23.9 258 | BTU-2,2/17/2017 13:15,23.33,19.53,92.5,25.9 259 | BTU-1,2/17/2017 13:10,23.02,19.14,105.1,30.1 260 | BTU-2,2/17/2017 13:10,23.71,19.26,89.8,29.5 261 | BTU-1,2/17/2017 13:05,22.53,20.33,101.6,16.4 262 | BTU-2,2/17/2017 13:05,23.27,20.4,89.8,19 263 | BTU-1,2/17/2017 13:00,22.46,19.33,101.8,23.5 264 | BTU-2,2/17/2017 13:00,23.23,19.41,89,25 265 | BTU-1,2/17/2017 12:55,22.58,19.4,102.7,24.1 266 | BTU-2,2/17/2017 12:55,23.26,19.42,90.7,25.7 267 | BTU-1,2/17/2017 12:50,22.62,19.45,106.4,24.8 268 | BTU-2,2/17/2017 12:50,23.15,19.36,89.1,24.9 269 | BTU-1,2/17/2017 12:45,22.22,19.44,102.6,21 270 | BTU-2,2/17/2017 12:45,23.03,19.34,90,24.5 271 | BTU-1,2/17/2017 12:40,22.5,19.36,102.7,23.8 272 | BTU-2,2/17/2017 12:40,23.15,19.33,89.1,25.1 273 | BTU-1,2/17/2017 12:35,22.29,19.25,103,23.1 274 | BTU-2,2/17/2017 12:35,23.43,19.29,90,27.5 275 | BTU-1,2/17/2017 12:30,23.06,19.81,101.2,24.2 276 | BTU-2,2/17/2017 12:30,23.43,19.75,88.3,23.9 277 | BTU-1,2/17/2017 12:25,22.23,19.81,104.4,18.6 278 | BTU-2,2/17/2017 12:25,23.14,20,88.6,20.5 279 | BTU-1,2/17/2017 12:20,22.11,19.04,103.2,23.2 280 | BTU-2,2/17/2017 12:20,23.17,19.24,90.1,26.1 281 | BTU-1,2/17/2017 12:15,22.84,18.86,102.6,30.1 282 | BTU-2,2/17/2017 12:15,23.58,18.94,88.3,30.2 283 | BTU-1,2/17/2017 12:10,23.04,19.82,101.8,24.1 284 | BTU-2,2/17/2017 12:10,23.41,19.92,88.5,22.8 285 | BTU-1,2/17/2017 12:05,22.32,19.9,107.4,19.1 286 | BTU-2,2/17/2017 12:05,23,19.82,91,21.3 287 | BTU-1,2/17/2017 12:00,22.18,19.19,103.1,22.7 288 | BTU-2,2/17/2017 12:00,23.37,19.07,91.6,29 289 | BTU-1,2/17/2017 11:55,23.05,19.33,101.9,28 290 | BTU-2,2/17/2017 11:55,23.5,19.32,89.1,27.4 291 | BTU-1,2/17/2017 11:50,22.81,20.04,101.6,20.6 292 | BTU-2,2/17/2017 11:50,23.02,19.92,88.9,20.3 293 | BTU-1,2/17/2017 11:45,22.13,18.99,100.7,23.3 294 | BTU-2,2/17/2017 11:45,22.98,19.12,89.5,25.4 295 | BTU-1,2/17/2017 11:40,22.31,19.12,101.8,23.8 296 | BTU-2,2/17/2017 11:40,23.03,19.14,89.5,25.7 297 | BTU-1,2/17/2017 11:35,22.07,18.89,103.3,24.2 298 | BTU-2,2/17/2017 11:35,22.92,19.04,89.4,25.5 299 | BTU-1,2/17/2017 11:30,22.2,18.99,102.1,24.1 300 | BTU-2,2/17/2017 11:30,23.25,18.95,88.2,28 301 | BTU-1,2/17/2017 11:25,22.43,19.31,101.5,23.3 302 | BTU-2,2/17/2017 11:25,23.28,19.45,88.4,24.9 303 | BTU-1,2/17/2017 11:20,22.44,19.4,103.4,23.1 304 | BTU-2,2/17/2017 11:20,23.24,19.54,88.4,24.1 305 | BTU-1,2/17/2017 11:15,22.44,19.43,101.9,22.6 306 | BTU-2,2/17/2017 11:15,23.18,19.53,89.2,24 307 | BTU-1,2/17/2017 11:10,22.5,19.4,100.6,23 308 | BTU-2,2/17/2017 11:10,23.18,19.43,89.1,24.6 309 | BTU-1,2/17/2017 11:05,22.56,19.62,100.3,21.6 310 | BTU-2,2/17/2017 11:05,22.92,19.53,89.4,22.3 311 | BTU-1,2/17/2017 11:00,22.31,19.21,127.1,28.9 312 | BTU-2,2/17/2017 11:00,22.99,19.18,105.4,29.6 313 | BTU-1,2/17/2017 10:55,22.21,19.15,97.2,21.9 314 | BTU-2,2/17/2017 10:55,22.76,19.14,85.2,22.7 315 | BTU-1,2/17/2017 10:50,21.84,18.87,109.8,24 316 | BTU-2,2/17/2017 10:50,22.68,19.04,96,25.7 317 | BTU-1,2/17/2017 10:45,21.78,18.78,110,24.3 318 | BTU-2,2/17/2017 10:45,22.54,18.85,96.4,26.2 319 | BTU-1,2/17/2017 10:40,21.68,18.68,110.9,24.5 320 | BTU-2,2/17/2017 10:40,22.64,18.81,96.4,27.2 321 | BTU-1,2/17/2017 10:35,21.92,18.77,110,25.5 322 | BTU-2,2/17/2017 10:35,22.78,18.86,96.2,27.8 323 | BTU-1,2/17/2017 10:30,22.39,19.08,110.4,26.9 324 | BTU-2,2/17/2017 10:30,22.78,19.08,94.8,25.9 325 | BTU-1,2/17/2017 10:25,21.79,19.06,106.5,21.4 326 | BTU-2,2/17/2017 10:25,22.39,19.1,92.4,22.4 327 | BTU-1,2/17/2017 10:20,21.61,19.02,127.6,24.3 328 | BTU-2,2/17/2017 10:20,22.4,19.12,114,27.5 329 | BTU-1,2/17/2017 10:15,21.76,19.15,121.3,23.3 330 | BTU-2,2/17/2017 10:15,22.4,19.09,103,25.1 331 | BTU-1,2/17/2017 10:10,21.74,19.03,131.9,26.3 332 | BTU-2,2/17/2017 10:10,22.35,18.98,115.4,28.7 333 | BTU-1,2/17/2017 10:05,21.63,18.73,118.2,25.3 334 | BTU-2,2/17/2017 10:05,22.45,18.87,101,26.6 335 | BTU-1,2/17/2017 10:00,21.67,18.74,112,24.2 336 | BTU-2,2/17/2017 10:00,22.36,18.74,96,25.6 337 | BTU-1,2/17/2017 9:55,21.58,18.6,108.2,23.8 338 | BTU-2,2/17/2017 9:55,22.31,18.65,95.6,25.8 339 | BTU-1,2/17/2017 9:50,21.59,18.56,112.4,25.1 340 | BTU-2,2/17/2017 9:50,22.2,18.49,97.2,26.6 341 | BTU-1,2/17/2017 9:45,21.43,18.31,109,25 342 | BTU-2,2/17/2017 9:45,22.25,18.43,96.1,27.1 343 | BTU-1,2/17/2017 9:40,21.55,18.36,111.7,26.2 344 | BTU-2,2/17/2017 9:40,22.21,18.35,96,27.3 345 | BTU-1,2/17/2017 9:35,21.32,18.25,113,25.5 346 | BTU-2,2/17/2017 9:35,22,18.29,97.9,26.7 347 | BTU-1,2/17/2017 9:30,21.44,18.4,112.1,25.1 348 | BTU-2,2/17/2017 9:30,22,18.31,99.2,27 349 | BTU-1,2/17/2017 9:25,21.29,18.21,115.6,26.2 350 | BTU-2,2/17/2017 9:25,22.02,18.29,98.5,27.1 351 | BTU-1,2/17/2017 9:20,21.36,18.24,113.5,26.1 352 | BTU-2,2/17/2017 9:20,22.12,18.4,99.7,27.3 353 | BTU-1,2/17/2017 9:15,21.55,18.44,117.1,26.8 354 | BTU-2,2/17/2017 9:15,22.14,18.45,98.4,26.7 355 | BTU-1,2/17/2017 9:10,21.58,18.51,112.5,25.5 356 | BTU-2,2/17/2017 9:10,22.05,18.48,97.4,25.6 357 | BTU-1,2/17/2017 9:05,21.39,18.31,115.6,26.2 358 | BTU-2,2/17/2017 9:05,22.12,18.45,99.3,26.9 359 | BTU-1,2/17/2017 9:00,21.33,18.25,114.9,26.1 360 | BTU-2,2/17/2017 9:00,22.12,18.43,98.6,26.8 361 | BTU-1,2/17/2017 8:55,21.29,18.27,112.9,25.1 362 | BTU-2,2/17/2017 8:55,22.21,18.48,99,27.2 363 | BTU-1,2/17/2017 8:50,21.56,18.5,114.1,25.7 364 | BTU-2,2/17/2017 8:50,22.16,18.46,98.6,26.8 365 | BTU-1,2/17/2017 8:45,21.38,18.32,115.5,26 366 | BTU-2,2/17/2017 8:45,22.17,18.5,99.5,26.9 367 | BTU-1,2/17/2017 8:40,21.39,18.35,110.3,24.7 368 | BTU-2,2/17/2017 8:40,22.14,18.41,99.7,27.4 369 | BTU-1,2/17/2017 8:35,21.55,18.53,113.3,25.2 370 | BTU-2,2/17/2017 8:35,22.15,18.41,99.3,27.4 371 | BTU-1,2/17/2017 8:30,21.42,18.37,112.5,25.3 372 | BTU-2,2/17/2017 8:30,22.22,18.46,99,27.4 373 | BTU-1,2/17/2017 8:25,21.42,18.36,114.4,25.8 374 | BTU-2,2/17/2017 8:25,22.12,18.42,98.6,26.9 375 | BTU-1,2/17/2017 8:20,21.5,18.42,113.6,25.8 376 | BTU-2,2/17/2017 8:20,22.13,18.49,99.2,26.6 377 | BTU-1,2/17/2017 8:15,21.55,18.45,115.8,26.4 378 | BTU-2,2/17/2017 8:15,22.06,18.4,98.8,26.7 379 | BTU-1,2/17/2017 8:10,21.31,18.31,113.2,25 380 | BTU-2,2/17/2017 8:10,22.01,18.31,99.9,27.3 381 | BTU-1,2/17/2017 8:05,21.44,18.39,115.1,25.9 382 | BTU-2,2/17/2017 8:05,22.12,18.35,99,27.5 383 | BTU-1,2/17/2017 8:00,21.3,18.18,117.9,27.1 384 | BTU-2,2/17/2017 8:00,22.13,18.36,98.6,27.4 385 | BTU-1,2/17/2017 7:55,21.58,18.42,110.9,25.8 386 | BTU-2,2/17/2017 7:55,22.21,18.49,99.1,27.2 387 | BTU-1,2/17/2017 7:50,21.34,18.27,113.3,25.6 388 | BTU-2,2/17/2017 7:50,22.13,18.41,98.8,27.1 389 | BTU-1,2/17/2017 7:45,21.3,18.25,113.3,25.5 390 | BTU-2,2/17/2017 7:45,22.12,18.4,99.2,27.2 391 | BTU-1,2/17/2017 7:40,21.43,18.34,114.3,26 392 | BTU-2,2/17/2017 7:40,22.25,18.5,99,27.4 393 | BTU-1,2/17/2017 7:35,21.61,18.49,114.9,26.4 394 | BTU-2,2/17/2017 7:35,22.15,18.45,100,27.3 395 | BTU-1,2/17/2017 7:30,21.47,18.45,113.9,25.3 396 | BTU-2,2/17/2017 7:30,22.13,18.44,99.5,27.1 397 | BTU-1,2/17/2017 7:25,21.39,18.37,113.9,25.3 398 | BTU-2,2/17/2017 7:25,22.18,18.5,98.3,26.7 399 | BTU-1,2/17/2017 7:20,21.29,18.25,115.4,25.9 400 | BTU-2,2/17/2017 7:20,22.1,18.45,99,26.6 401 | BTU-1,2/17/2017 7:15,21.44,18.42,113.7,25.3 402 | BTU-2,2/17/2017 7:15,22.11,18.4,98.8,27 403 | BTU-1,2/17/2017 7:10,21.5,18.42,113.7,25.8 404 | BTU-2,2/17/2017 7:10,22.19,18.5,98,26.7 405 | BTU-1,2/17/2017 7:05,21.47,18.42,112.8,25.3 406 | BTU-2,2/17/2017 7:05,22.17,18.45,99.7,27.3 407 | BTU-1,2/17/2017 7:00,21.43,18.42,115.7,25.7 408 | BTU-2,2/17/2017 7:00,22.16,18.46,98.1,26.7 409 | BTU-1,2/17/2017 6:55,21.47,18.43,114.8,25.7 410 | BTU-2,2/17/2017 6:55,22.11,18.41,99.4,27.1 411 | BTU-1,2/17/2017 6:50,21.49,18.45,113.3,25.3 412 | BTU-2,2/17/2017 6:50,22.16,18.45,98.8,27 413 | BTU-1,2/17/2017 6:45,21.37,18.34,116,25.9 414 | BTU-2,2/17/2017 6:45,22.17,18.43,98.3,27.1 415 | BTU-1,2/17/2017 6:40,21.53,18.53,114.4,25.3 416 | BTU-2,2/17/2017 6:40,22.21,18.46,99,27.3 417 | BTU-1,2/17/2017 6:35,21.61,18.51,113.1,25.8 418 | BTU-2,2/17/2017 6:35,22.22,18.46,99,27.4 419 | BTU-1,2/17/2017 6:30,21.45,18.4,116.3,26.1 420 | BTU-2,2/17/2017 6:30,22.21,18.48,99.4,27.3 421 | BTU-1,2/17/2017 6:25,21.55,18.54,114.7,25.4 422 | BTU-2,2/17/2017 6:25,22.21,18.53,99.5,27 423 | BTU-1,2/17/2017 6:20,21.38,18.39,114.6,25.2 424 | BTU-2,2/17/2017 6:20,22.14,18.46,100.3,27.1 425 | BTU-1,2/17/2017 6:15,21.48,18.44,111.3,24.9 426 | BTU-2,2/17/2017 6:15,22.18,18.49,99.8,27.1 427 | BTU-1,2/17/2017 6:10,21.34,18.34,114.2,25.2 428 | BTU-2,2/17/2017 6:10,22.15,18.49,99.3,26.8 429 | BTU-1,2/17/2017 6:05,21.53,18.51,113.1,25.2 430 | BTU-2,2/17/2017 6:05,22.07,18.37,99.5,27.1 431 | BTU-1,2/17/2017 6:00,21.26,18.26,112.3,24.8 432 | BTU-2,2/17/2017 6:00,22.07,18.37,99.5,27.1 433 | BTU-1,2/17/2017 5:55,21.43,18.34,114,26 434 | BTU-2,2/17/2017 5:55,22.07,18.33,100.4,27.7 435 | BTU-1,2/17/2017 5:50,21.34,18.25,114,26 436 | BTU-2,2/17/2017 5:50,22.14,18.34,98.2,27.5 437 | BTU-1,2/17/2017 5:45,21.36,18.35,112.2,24.9 438 | BTU-2,2/17/2017 5:45,22.11,18.4,99.7,27.3 439 | BTU-1,2/17/2017 5:40,21.29,18.29,113.5,25 440 | BTU-2,2/17/2017 5:40,22.1,18.36,99.8,27.5 441 | BTU-1,2/17/2017 5:35,21.4,18.37,110.6,24.7 442 | BTU-2,2/17/2017 5:35,22.09,18.29,95.2,26.6 443 | BTU-1,2/17/2017 5:30,21.37,18.33,115.4,25.9 444 | BTU-2,2/17/2017 5:30,22.2,18.35,98.8,28 445 | BTU-1,2/17/2017 5:25,21.48,18.25,108.2,25.8 446 | BTU-2,2/17/2017 5:25,22.25,18.36,94.3,27 447 | BTU-1,2/17/2017 5:20,21.52,18.27,106.3,25.5 448 | BTU-2,2/17/2017 5:20,22.36,18.45,91.4,26.3 449 | BTU-1,2/17/2017 5:15,21.63,18.53,107.7,24.6 450 | BTU-2,2/17/2017 5:15,22.21,18.46,93.1,25.7 451 | BTU-1,2/17/2017 5:10,21.44,18.4,114.4,25.6 452 | BTU-2,2/17/2017 5:10,22.13,18.44,98.9,26.9 453 | BTU-1,2/17/2017 5:05,21.32,18.32,115.6,25.5 454 | BTU-2,2/17/2017 5:05,22.1,18.46,99.5,26.6 455 | BTU-1,2/17/2017 5:00,21.33,18.37,114.4,24.8 456 | BTU-2,2/17/2017 5:00,22.15,18.51,98.7,26.5 457 | BTU-1,2/17/2017 4:55,21.32,18.35,112.6,24.6 458 | BTU-2,2/17/2017 4:55,22.1,18.42,98.2,26.6 459 | BTU-1,2/17/2017 4:50,21.29,18.32,118.2,25.9 460 | BTU-2,2/17/2017 4:50,22.15,18.49,98.1,26.5 461 | BTU-1,2/17/2017 4:45,21.35,18.37,114.9,25.2 462 | BTU-2,2/17/2017 4:45,22.11,18.49,99.3,26.5 463 | BTU-1,2/17/2017 4:40,21.33,18.36,113.6,24.9 464 | BTU-2,2/17/2017 4:40,22.07,18.46,99.5,26.4 465 | BTU-1,2/17/2017 4:35,21.44,18.48,115.1,25.1 466 | BTU-2,2/17/2017 4:35,22.07,18.46,98.3,26.1 467 | BTU-1,2/17/2017 4:30,21.35,18.45,112.6,24.1 468 | BTU-2,2/17/2017 4:30,22.12,18.42,99.3,27.1 469 | BTU-1,2/17/2017 4:25,21.3,18.33,113.1,24.8 470 | BTU-2,2/17/2017 4:25,22.04,18.27,99.6,27.7 471 | BTU-1,2/17/2017 4:20,21.35,18.34,114.2,25.3 472 | BTU-2,2/17/2017 4:20,22.11,18.32,98.9,27.6 473 | BTU-1,2/17/2017 4:15,21.3,18.17,113.6,26.2 474 | BTU-2,2/17/2017 4:15,22.19,18.31,100.1,28.6 475 | BTU-1,2/17/2017 4:10,21.71,18.45,103.3,24.7 476 | BTU-2,2/17/2017 4:10,22.27,18.48,91.6,25.6 477 | BTU-1,2/17/2017 4:05,21.32,18.35,106.4,23.3 478 | BTU-2,2/17/2017 4:05,22.15,18.51,92.4,24.8 479 | BTU-1,2/17/2017 4:00,21.43,18.45,110.6,24.2 480 | BTU-2,2/17/2017 4:00,22.08,18.44,99.9,26.8 481 | BTU-1,2/17/2017 3:55,21.37,18.4,114.6,25.1 482 | BTU-2,2/17/2017 3:55,22.16,18.54,99.2,26.4 483 | BTU-1,2/17/2017 3:50,21.55,18.6,114.2,24.8 484 | BTU-2,2/17/2017 3:50,22.17,18.58,99.2,26.2 485 | BTU-1,2/17/2017 3:45,21.44,18.54,114.1,24.4 486 | BTU-2,2/17/2017 3:45,22.15,18.54,98.6,26.2 487 | BTU-1,2/17/2017 3:40,21.51,18.54,113.4,24.8 488 | BTU-2,2/17/2017 3:40,22.13,18.51,99.4,26.5 489 | BTU-1,2/17/2017 3:35,21.58,18.59,116.8,25.7 490 | BTU-2,2/17/2017 3:35,22.16,18.54,98.6,26.2 491 | BTU-1,2/17/2017 3:30,21.51,18.54,116.1,25.3 492 | BTU-2,2/17/2017 3:30,22.16,18.53,99.6,26.6 493 | BTU-1,2/17/2017 3:25,21.51,18.48,112.9,25.2 494 | BTU-2,2/17/2017 3:25,22.15,18.48,99.3,26.8 495 | BTU-1,2/17/2017 3:20,21.24,18.45,115.7,23.7 496 | BTU-2,2/17/2017 3:20,22,18.5,99,25.5 497 | BTU-1,2/17/2017 3:15,21.41,18.45,124,27.1 498 | BTU-2,2/17/2017 3:15,22.24,18.64,108.1,28.7 499 | BTU-1,2/17/2017 3:10,21.5,18.4,110.4,25.2 500 | BTU-2,2/17/2017 3:10,22.22,18.52,97.9,26.7 501 | BTU-1,2/17/2017 3:05,21.43,18.41,112.9,25.1 502 | BTU-2,2/17/2017 3:05,22.22,18.5,95.7,26.2 503 | BTU-1,2/17/2017 3:00,21.57,18.36,97.1,22.9 504 | BTU-2,2/17/2017 3:00,22.29,18.57,86.5,23.7 505 | BTU-1,2/17/2017 2:55,21.47,18.42,109,24.5 506 | BTU-2,2/17/2017 2:55,22.29,18.6,96.6,26.3 507 | BTU-1,2/17/2017 2:50,21.68,18.62,109,24.6 508 | BTU-2,2/17/2017 2:50,22.22,18.58,94.6,25.4 509 | BTU-1,2/17/2017 2:45,21.75,18.67,110.2,25 510 | BTU-2,2/17/2017 2:45,22.29,18.57,97,26.6 511 | BTU-1,2/17/2017 2:40,21.69,18.48,109.9,26 512 | BTU-2,2/17/2017 2:40,22.41,18.6,96.1,27 513 | BTU-1,2/17/2017 2:35,21.83,18.78,111.2,25 514 | BTU-2,2/17/2017 2:35,22.42,18.75,95.6,25.9 515 | BTU-1,2/17/2017 2:30,21.73,18.69,108,24.2 516 | BTU-2,2/17/2017 2:30,22.36,18.75,95.8,25.5 517 | BTU-1,2/17/2017 2:25,21.91,18.85,113.3,25.5 518 | BTU-2,2/17/2017 2:25,22.46,18.84,95.9,25.6 519 | BTU-1,2/17/2017 2:20,21.65,18.67,111.2,24.4 520 | BTU-2,2/17/2017 2:20,22.41,18.85,95.9,25.2 521 | BTU-1,2/17/2017 2:15,21.88,18.84,114.6,25.7 522 | BTU-2,2/17/2017 2:15,22.44,18.91,97.1,25.3 523 | BTU-1,2/17/2017 2:10,21.79,18.82,110,24.1 524 | BTU-2,2/17/2017 2:10,22.37,18.81,96.4,25.3 525 | BTU-1,2/17/2017 2:05,21.88,18.91,109.9,24.1 526 | BTU-2,2/17/2017 2:05,22.47,18.92,96.5,25.2 527 | BTU-1,2/17/2017 2:00,21.88,18.93,112.5,24.5 528 | BTU-2,2/17/2017 2:00,22.31,18.73,95.3,25.2 529 | BTU-1,2/17/2017 1:55,21.68,18.7,113.4,24.8 530 | BTU-2,2/17/2017 1:55,22.32,18.77,96.1,25.1 531 | BTU-1,2/17/2017 1:50,21.47,18.41,111.5,25.1 532 | BTU-2,2/17/2017 1:50,22.23,18.62,95.7,25.5 533 | BTU-1,2/17/2017 1:45,21.48,18.44,109.2,24.5 534 | BTU-2,2/17/2017 1:45,22.37,18.43,96.3,28 535 | BTU-1,2/17/2017 1:40,21.79,18.49,112,27.2 536 | BTU-2,2/17/2017 1:40,22.71,18.73,96.7,28.4 537 | BTU-1,2/17/2017 1:35,22.07,18.87,99.4,23.4 538 | BTU-2,2/17/2017 1:35,22.64,18.95,87.3,23.7 539 | BTU-1,2/17/2017 1:30,21.76,18.87,101.2,21.5 540 | BTU-2,2/17/2017 1:30,22.39,18.93,87.6,22.3 541 | BTU-1,2/17/2017 1:25,21.63,18.76,110,23.2 542 | BTU-2,2/17/2017 1:25,22.41,18.85,97,25.5 543 | BTU-1,2/17/2017 1:20,21.74,18.67,111.7,25.3 544 | BTU-2,2/17/2017 1:20,22.44,18.62,96.4,27.1 545 | BTU-1,2/17/2017 1:15,21.9,18.74,110.1,25.6 546 | BTU-2,2/17/2017 1:15,22.68,18.73,97.1,28.3 547 | BTU-1,2/17/2017 1:10,22.08,18.7,111,27.6 548 | BTU-2,2/17/2017 1:10,22.73,18.7,95.6,28.4 549 | BTU-1,2/17/2017 1:05,21.58,18.46,103.2,23.6 550 | BTU-2,2/17/2017 1:05,22.57,18.64,86.7,25.1 551 | BTU-1,2/17/2017 1:00,21.81,18.6,111.8,26.4 552 | BTU-2,2/17/2017 1:00,22.64,18.91,96.3,26.5 553 | BTU-1,2/17/2017 0:55,22.11,18.76,105.2,26 554 | BTU-2,2/17/2017 0:55,22.75,18.79,90.2,26.3 555 | BTU-1,2/17/2017 0:50,21.74,18.66,105.1,23.8 556 | BTU-2,2/17/2017 0:50,22.63,18.65,91.4,26.8 557 | BTU-1,2/17/2017 0:45,22.03,18.9,110,25.4 558 | BTU-2,2/17/2017 0:45,22.77,18.92,95.4,27.1 559 | BTU-1,2/17/2017 0:40,22.16,18.91,103.6,24.8 560 | BTU-2,2/17/2017 0:40,22.8,19.01,91.6,25.6 561 | BTU-1,2/17/2017 0:35,21.65,18.66,104.6,23 562 | BTU-2,2/17/2017 0:35,22.46,18.71,90.2,24.8 563 | BTU-1,2/17/2017 0:30,21.68,18.59,112.6,25.6 564 | BTU-2,2/17/2017 0:30,22.72,18.73,97.5,28.7 565 | BTU-1,2/17/2017 0:25,22.02,18.76,108.8,26.1 566 | BTU-2,2/17/2017 0:25,22.82,18.96,95.9,27.2 567 | BTU-1,2/17/2017 0:20,22.17,18.95,104.1,24.7 568 | BTU-2,2/17/2017 0:20,22.8,19.04,91.6,25.3 569 | BTU-1,2/17/2017 0:15,21.73,18.75,106,23.3 570 | BTU-2,2/17/2017 0:15,22.56,18.79,89.7,24.9 571 | BTU-1,2/17/2017 0:10,21.91,18.81,108.2,24.7 572 | BTU-2,2/17/2017 0:10,22.64,18.75,94.9,27.2 573 | BTU-1,2/17/2017 0:05,22.1,18.79,112.4,27.4 574 | BTU-2,2/17/2017 0:05,22.62,18.79,95.7,27 575 | BTU-1,2/17/2017 0:00,21.97,18.79,111.2,26 576 | BTU-2,2/17/2017 0:00,22.7,18.73,94.9,27.8 577 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Ramendra Kumar 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Practice Problem_ Basic Python_1.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 15, 6 | "metadata": {}, 7 | "outputs": [ 8 | { 9 | "name": "stdout", 10 | "output_type": "stream", 11 | "text": [ 12 | "put coma seperated numbers1,2,3,4\n" 13 | ] 14 | } 15 | ], 16 | "source": [ 17 | "values=input('put coma seperated numbers')\n" 18 | ] 19 | }, 20 | { 21 | "cell_type": "code", 22 | "execution_count": 16, 23 | "metadata": {}, 24 | "outputs": [ 25 | { 26 | "data": { 27 | "text/plain": [ 28 | "'1,2,3,4'" 29 | ] 30 | }, 31 | "execution_count": 16, 32 | "metadata": {}, 33 | "output_type": "execute_result" 34 | } 35 | ], 36 | "source": [ 37 | "values" 38 | ] 39 | }, 40 | { 41 | "cell_type": "code", 42 | "execution_count": 17, 43 | "metadata": {}, 44 | "outputs": [ 45 | { 46 | "data": { 47 | "text/plain": [ 48 | "['1', '2', '3', '4']" 49 | ] 50 | }, 51 | "execution_count": 17, 52 | "metadata": {}, 53 | "output_type": "execute_result" 54 | } 55 | ], 56 | "source": [ 57 | "values.split(',')" 58 | ] 59 | }, 60 | { 61 | "cell_type": "code", 62 | "execution_count": 21, 63 | "metadata": {}, 64 | "outputs": [ 65 | { 66 | "name": "stdout", 67 | "output_type": "stream", 68 | "text": [ 69 | "sum of above two num = 9\n" 70 | ] 71 | } 72 | ], 73 | "source": [ 74 | "a=4\n", 75 | "b=5\n", 76 | "c=a+b\n", 77 | "print('sum of above two num = ',c)" 78 | ] 79 | }, 80 | { 81 | "cell_type": "code", 82 | "execution_count": 23, 83 | "metadata": {}, 84 | "outputs": [ 85 | { 86 | "data": { 87 | "text/plain": [ 88 | "['Red', 'Green', 'White', 'Black']" 89 | ] 90 | }, 91 | "execution_count": 23, 92 | "metadata": {}, 93 | "output_type": "execute_result" 94 | } 95 | ], 96 | "source": [ 97 | "col = [\"Red\",\"Green\",\"White\" ,\"Black\"]\n", 98 | "col" 99 | ] 100 | }, 101 | { 102 | "cell_type": "code", 103 | "execution_count": 30, 104 | "metadata": {}, 105 | "outputs": [ 106 | { 107 | "data": { 108 | "text/plain": [ 109 | "'Red'" 110 | ] 111 | }, 112 | "execution_count": 30, 113 | "metadata": {}, 114 | "output_type": "execute_result" 115 | } 116 | ], 117 | "source": [ 118 | "col[0]" 119 | ] 120 | }, 121 | { 122 | "cell_type": "code", 123 | "execution_count": 31, 124 | "metadata": {}, 125 | "outputs": [ 126 | { 127 | "data": { 128 | "text/plain": [ 129 | "'Black'" 130 | ] 131 | }, 132 | "execution_count": 31, 133 | "metadata": {}, 134 | "output_type": "execute_result" 135 | } 136 | ], 137 | "source": [ 138 | "col[-1]" 139 | ] 140 | }, 141 | { 142 | "cell_type": "code", 143 | "execution_count": 36, 144 | "metadata": {}, 145 | "outputs": [ 146 | { 147 | "name": "stdout", 148 | "output_type": "stream", 149 | "text": [ 150 | "Red,Black\n" 151 | ] 152 | } 153 | ], 154 | "source": [ 155 | "print(col[0],end=',')\n", 156 | "print(col[-1])" 157 | ] 158 | }, 159 | { 160 | "cell_type": "code", 161 | "execution_count": 37, 162 | "metadata": {}, 163 | "outputs": [ 164 | { 165 | "name": "stdout", 166 | "output_type": "stream", 167 | "text": [ 168 | "put the number5\n", 169 | "615\n" 170 | ] 171 | } 172 | ], 173 | "source": [ 174 | "a=input('put the number')\n", 175 | "s=int(a)+int(a*2)+int(a*3)\n", 176 | "print(s)" 177 | ] 178 | }, 179 | { 180 | "cell_type": "code", 181 | "execution_count": 26, 182 | "metadata": {}, 183 | "outputs": [ 184 | { 185 | "name": "stdout", 186 | "output_type": "stream", 187 | "text": [ 188 | "put number of colors4\n", 189 | "color namered\n", 190 | "color nameblack\n", 191 | "color namegreen\n", 192 | "color nameblue\n", 193 | "['red', 'black', 'green', 'blue']\n", 194 | "['red', 'blue']\n" 195 | ] 196 | } 197 | ], 198 | "source": [ 199 | "nc=input('put number of colors')\n", 200 | "lc=[]\n", 201 | "for i in range(int(nc)):\n", 202 | " a=input('color name')\n", 203 | " lc.append(a)\n", 204 | "print(lc)\n", 205 | "print([lc[0],lc[-1]])" 206 | ] 207 | }, 208 | { 209 | "cell_type": "code", 210 | "execution_count": 3, 211 | "metadata": {}, 212 | "outputs": [ 213 | { 214 | "name": "stdout", 215 | "output_type": "stream", 216 | "text": [ 217 | "put coma seperated binary number of 4 digits.0101,0011,1010,1110\n", 218 | "1010,1110," 219 | ] 220 | } 221 | ], 222 | "source": [ 223 | "a=input(\"put coma seperated binary number of 4 digits.\")\n", 224 | "b=a.split(',')\n", 225 | "for i in b:\n", 226 | " if int(i)%5==0:\n", 227 | " print(i,end=',')\n", 228 | " " 229 | ] 230 | }, 231 | { 232 | "cell_type": "code", 233 | "execution_count": 5, 234 | "metadata": {}, 235 | "outputs": [ 236 | { 237 | "data": { 238 | "text/plain": [ 239 | "['r', 'a', 'm', 'e', 'n', '1', '2', '3']" 240 | ] 241 | }, 242 | "execution_count": 5, 243 | "metadata": {}, 244 | "output_type": "execute_result" 245 | } 246 | ], 247 | "source": [ 248 | "word='ramen123'\n", 249 | "l1=list(word)\n", 250 | "l1" 251 | ] 252 | }, 253 | { 254 | "cell_type": "code", 255 | "execution_count": 13, 256 | "metadata": {}, 257 | "outputs": [ 258 | { 259 | "data": { 260 | "text/plain": [ 261 | "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]" 262 | ] 263 | }, 264 | "execution_count": 13, 265 | "metadata": {}, 266 | "output_type": "execute_result" 267 | } 268 | ], 269 | "source": [ 270 | "#generate a list having 1 to 20 numbers\n", 271 | "l1=[]\n", 272 | "for i in range(1,12):\n", 273 | " l1.append(i)\n", 274 | "l1" 275 | ] 276 | }, 277 | { 278 | "cell_type": "code", 279 | "execution_count": 3, 280 | "metadata": {}, 281 | "outputs": [ 282 | { 283 | "name": "stdout", 284 | "output_type": "stream", 285 | "text": [ 286 | "count of even number = 3 and count of odd number = 4\n" 287 | ] 288 | } 289 | ], 290 | "source": [ 291 | "## Now counting even and odd in above list\n", 292 | "l1=[2,7,8,9,0,13,25]\n", 293 | "c_even=0\n", 294 | "c_odd=0\n", 295 | "for i in l1:\n", 296 | " if i%2==0:\n", 297 | " c_even+=1\n", 298 | " else:\n", 299 | " c_odd+=1\n", 300 | "print('count of even number = %d and count of odd number = %d' %(c_even, c_odd)) " 301 | ] 302 | }, 303 | { 304 | "cell_type": "code", 305 | "execution_count": 16, 306 | "metadata": { 307 | "collapsed": true 308 | }, 309 | "outputs": [ 310 | { 311 | "name": "stdout", 312 | "output_type": "stream", 313 | "text": [ 314 | "1\n", 315 | "Fizz\n", 316 | "Buzz\n", 317 | "62\n", 318 | "FizzBuzz\n", 319 | "FizzBuzz\n", 320 | "FizzBuzz\n", 321 | "Fizz\n", 322 | "8\n", 323 | "Fizz\n", 324 | "13\n", 325 | "11\n" 326 | ] 327 | } 328 | ], 329 | "source": [ 330 | "l1=[1,3,5,62,15,75,45,6,8,9,13,11]\n", 331 | "for i in l1:\n", 332 | " if (i%3==0) and (i%5==0):\n", 333 | " print('FizzBuzz')\n", 334 | " elif(i%3==0):\n", 335 | " print('Fizz')\n", 336 | " elif(i%5==0):\n", 337 | " print('Buzz')\n", 338 | " else:\n", 339 | " print(i)" 340 | ] 341 | }, 342 | { 343 | "cell_type": "code", 344 | "execution_count": 20, 345 | "metadata": { 346 | "collapsed": true 347 | }, 348 | "outputs": [ 349 | { 350 | "data": { 351 | "text/plain": [ 352 | "[2,\n", 353 | " 3,\n", 354 | " 4,\n", 355 | " 5,\n", 356 | " 6,\n", 357 | " 7,\n", 358 | " 8,\n", 359 | " 9,\n", 360 | " 10,\n", 361 | " 11,\n", 362 | " 12,\n", 363 | " 13,\n", 364 | " 14,\n", 365 | " 15,\n", 366 | " 16,\n", 367 | " 17,\n", 368 | " 18,\n", 369 | " 19,\n", 370 | " 20,\n", 371 | " 21,\n", 372 | " 22,\n", 373 | " 23,\n", 374 | " 24,\n", 375 | " 25,\n", 376 | " 26,\n", 377 | " 27,\n", 378 | " 28,\n", 379 | " 29,\n", 380 | " 30,\n", 381 | " 31,\n", 382 | " 32,\n", 383 | " 33,\n", 384 | " 34,\n", 385 | " 35,\n", 386 | " 36,\n", 387 | " 37,\n", 388 | " 38,\n", 389 | " 39,\n", 390 | " 40,\n", 391 | " 41,\n", 392 | " 42,\n", 393 | " 43,\n", 394 | " 44,\n", 395 | " 45,\n", 396 | " 46,\n", 397 | " 47,\n", 398 | " 48,\n", 399 | " 49,\n", 400 | " 50,\n", 401 | " 51,\n", 402 | " 52,\n", 403 | " 53,\n", 404 | " 54,\n", 405 | " 55,\n", 406 | " 56,\n", 407 | " 57,\n", 408 | " 58,\n", 409 | " 59,\n", 410 | " 60,\n", 411 | " 61,\n", 412 | " 62,\n", 413 | " 63,\n", 414 | " 64,\n", 415 | " 65,\n", 416 | " 66,\n", 417 | " 67,\n", 418 | " 68,\n", 419 | " 69,\n", 420 | " 70,\n", 421 | " 71,\n", 422 | " 72,\n", 423 | " 73,\n", 424 | " 74,\n", 425 | " 75,\n", 426 | " 76,\n", 427 | " 77,\n", 428 | " 78,\n", 429 | " 79,\n", 430 | " 80,\n", 431 | " 81,\n", 432 | " 82,\n", 433 | " 83,\n", 434 | " 84,\n", 435 | " 85,\n", 436 | " 86,\n", 437 | " 87,\n", 438 | " 88,\n", 439 | " 89,\n", 440 | " 90,\n", 441 | " 91,\n", 442 | " 92,\n", 443 | " 93,\n", 444 | " 94,\n", 445 | " 95,\n", 446 | " 96,\n", 447 | " 97,\n", 448 | " 98,\n", 449 | " 99,\n", 450 | " 100]" 451 | ] 452 | }, 453 | "execution_count": 20, 454 | "metadata": {}, 455 | "output_type": "execute_result" 456 | } 457 | ], 458 | "source": [ 459 | "# making list of 1 to 100\n", 460 | "list1=list(range(2,101))\n", 461 | "list1" 462 | ] 463 | }, 464 | { 465 | "cell_type": "code", 466 | "execution_count": 21, 467 | "metadata": { 468 | "collapsed": true 469 | }, 470 | "outputs": [ 471 | { 472 | "name": "stdout", 473 | "output_type": "stream", 474 | "text": [ 475 | "11\n", 476 | "13\n", 477 | "17\n", 478 | "19\n", 479 | "23\n", 480 | "29\n", 481 | "31\n", 482 | "37\n", 483 | "41\n", 484 | "43\n", 485 | "47\n", 486 | "53\n", 487 | "59\n", 488 | "61\n", 489 | "67\n", 490 | "71\n", 491 | "73\n", 492 | "79\n", 493 | "83\n", 494 | "89\n", 495 | "97\n" 496 | ] 497 | } 498 | ], 499 | "source": [ 500 | "for i in list1:\n", 501 | " if (i%2)and(i%3)and(i%5)and(i%7):\n", 502 | " print(i)\n", 503 | " " 504 | ] 505 | }, 506 | { 507 | "cell_type": "code", 508 | "execution_count": 24, 509 | "metadata": {}, 510 | "outputs": [ 511 | { 512 | "name": "stdout", 513 | "output_type": "stream", 514 | "text": [ 515 | "Plese enter alphanumeric stringRamen.123\n", 516 | "Ccount of alphabetical charater = 5 and count of digit = 3\n" 517 | ] 518 | } 519 | ], 520 | "source": [ 521 | "str1=input('Plese enter alphanumeric string')\n", 522 | "list1=list(str1)\n", 523 | "c_d=0\n", 524 | "c_a=0\n", 525 | "for i in list1:\n", 526 | " if i.isalpha():\n", 527 | " c_a+=1\n", 528 | " elif i.isdecimal():\n", 529 | " c_d+=1\n", 530 | "print('Count of alphabetical charater = %d and count of digit = %d' %(c_a,c_d) )" 531 | ] 532 | }, 533 | { 534 | "cell_type": "code", 535 | "execution_count": 22, 536 | "metadata": {}, 537 | "outputs": [ 538 | { 539 | "data": { 540 | "text/plain": [ 541 | "['R', 'a', 'm', 'e', 'n', '.', '1', '2', '3']" 542 | ] 543 | }, 544 | "execution_count": 22, 545 | "metadata": {}, 546 | "output_type": "execute_result" 547 | } 548 | ], 549 | "source": [ 550 | "ss='Ramen.123'\n", 551 | "ll=list(ss)\n", 552 | "ll" 553 | ] 554 | }, 555 | { 556 | "cell_type": "code", 557 | "execution_count": 2, 558 | "metadata": {}, 559 | "outputs": [ 560 | { 561 | "name": "stdout", 562 | "output_type": "stream", 563 | "text": [ 564 | "retratser" 565 | ] 566 | } 567 | ], 568 | "source": [ 569 | "##reversing a string\n", 570 | "str1='restarter'\n", 571 | "n=len(str1)\n", 572 | "for i in range(-1,-(n+1),-1):\n", 573 | " print(str1[i],end='')\n", 574 | " " 575 | ] 576 | }, 577 | { 578 | "cell_type": "code", 579 | "execution_count": 24, 580 | "metadata": {}, 581 | "outputs": [ 582 | { 583 | "name": "stdout", 584 | "output_type": "stream", 585 | "text": [ 586 | "retratser" 587 | ] 588 | } 589 | ], 590 | "source": [ 591 | "## a second approach to reversing string\n", 592 | "str1='restarter'\n", 593 | "n=len(str1)\n", 594 | "for i in range(n-1,-1,-1):\n", 595 | " print(str1[i],end='')\n", 596 | " " 597 | ] 598 | }, 599 | { 600 | "cell_type": "code", 601 | "execution_count": 26, 602 | "metadata": {}, 603 | "outputs": [ 604 | { 605 | "data": { 606 | "text/plain": [ 607 | "'retratser'" 608 | ] 609 | }, 610 | "execution_count": 26, 611 | "metadata": {}, 612 | "output_type": "execute_result" 613 | } 614 | ], 615 | "source": [ 616 | "str1='restarter'\n", 617 | "str1[::-1]" 618 | ] 619 | }, 620 | { 621 | "cell_type": "code", 622 | "execution_count": 20, 623 | "metadata": {}, 624 | "outputs": [ 625 | { 626 | "data": { 627 | "text/plain": [ 628 | "'resta$te$'" 629 | ] 630 | }, 631 | "execution_count": 20, 632 | "metadata": {}, 633 | "output_type": "execute_result" 634 | } 635 | ], 636 | "source": [ 637 | "## changing the 'r' with '$' in a string except 'r' at first position \n", 638 | "str1='restarter'\n", 639 | "st=list(str1)\n", 640 | "a=len(st)\n", 641 | "for i in range(1,a):\n", 642 | " if st[i]=='r':\n", 643 | " st[i]='$'\n", 644 | "st=''.join(st) \n", 645 | "st" 646 | ] 647 | }, 648 | { 649 | "cell_type": "code", 650 | "execution_count": 22, 651 | "metadata": {}, 652 | "outputs": [ 653 | { 654 | "data": { 655 | "text/plain": [ 656 | "'resta$te$'" 657 | ] 658 | }, 659 | "execution_count": 22, 660 | "metadata": {}, 661 | "output_type": "execute_result" 662 | } 663 | ], 664 | "source": [ 665 | "str1='restarter'\n", 666 | "str1[0]+str1[1:].replace('r','$') ## Using Replace command" 667 | ] 668 | }, 669 | { 670 | "cell_type": "code", 671 | "execution_count": 28, 672 | "metadata": {}, 673 | "outputs": [ 674 | { 675 | "name": "stdout", 676 | "output_type": "stream", 677 | "text": [ 678 | "total number of r in given string = 3\n" 679 | ] 680 | } 681 | ], 682 | "source": [ 683 | "##counting 'r' in string :> 'restarter'\n", 684 | "str1='restarter'\n", 685 | "sm=0\n", 686 | "for i in str1:\n", 687 | " if i=='r':\n", 688 | " sm=sm+1\n", 689 | "print('total number of r in given string = ', sm)\n" 690 | ] 691 | }, 692 | { 693 | "cell_type": "code", 694 | "execution_count": 32, 695 | "metadata": {}, 696 | "outputs": [], 697 | "source": [ 698 | "## calculate mode from a given list l1\n", 699 | "l1=[1,2,3,2,3,3,4,5]\n", 700 | "l_c=len(l1)\n", 701 | "unique=list(set(l1))\n", 702 | "u_c=len(a)\n", 703 | "for i in range()" 704 | ] 705 | }, 706 | { 707 | "cell_type": "code", 708 | "execution_count": 33, 709 | "metadata": {}, 710 | "outputs": [ 711 | { 712 | "data": { 713 | "text/plain": [ 714 | "{1, 2, 3, 4, 5}" 715 | ] 716 | }, 717 | "execution_count": 33, 718 | "metadata": {}, 719 | "output_type": "execute_result" 720 | } 721 | ], 722 | "source": [ 723 | "a" 724 | ] 725 | }, 726 | { 727 | "cell_type": "code", 728 | "execution_count": 31, 729 | "metadata": {}, 730 | "outputs": [ 731 | { 732 | "data": { 733 | "text/plain": [ 734 | "[1, 2, 3, 4, 5]" 735 | ] 736 | }, 737 | "execution_count": 31, 738 | "metadata": {}, 739 | "output_type": "execute_result" 740 | } 741 | ], 742 | "source": [ 743 | "list(a)" 744 | ] 745 | }, 746 | { 747 | "cell_type": "code", 748 | "execution_count": 5, 749 | "metadata": { 750 | "collapsed": true 751 | }, 752 | "outputs": [ 753 | { 754 | "name": "stdout", 755 | "output_type": "stream", 756 | "text": [ 757 | "* \n", 758 | "* * \n", 759 | "* * * \n", 760 | "* * * * \n", 761 | "* * * * * \n", 762 | "* * * * * * \n", 763 | "* * * * * \n", 764 | "* * * * \n", 765 | "* * * \n", 766 | "* * \n", 767 | "* \n" 768 | ] 769 | } 770 | ], 771 | "source": [ 772 | "## Printing star pattern\n", 773 | "n=12\n", 774 | "for i in range(1,n):\n", 775 | " if i<=n/2:\n", 776 | " print('* '*i)\n", 777 | " else:\n", 778 | " print('* '*(n-i))" 779 | ] 780 | }, 781 | { 782 | "cell_type": "code", 783 | "execution_count": 1, 784 | "metadata": {}, 785 | "outputs": [], 786 | "source": [ 787 | "##Write a Python function to find the maximum and minimum numbers from a sequence of numbers.\n", 788 | "##Note: Do not use built-in functions.\n", 789 | "##Not working\n", 790 | "\n", 791 | "l1=[-1,-5,4,3,1,2,7]\n", 792 | "n=len(l1)\n", 793 | "for i in range(n-1):\n", 794 | " a=l1[i]\n", 795 | " b=l1[i+1]\n", 796 | " if a>b:\n", 797 | " c=a\n", 798 | " a=b\n", 799 | " b=c\n", 800 | " l1[i]=a\n", 801 | " l1[i+1]=b" 802 | ] 803 | }, 804 | { 805 | "cell_type": "code", 806 | "execution_count": 2, 807 | "metadata": {}, 808 | "outputs": [ 809 | { 810 | "data": { 811 | "text/plain": [ 812 | "[-5, -1, 3, 1, 2, 4, 7]" 813 | ] 814 | }, 815 | "execution_count": 2, 816 | "metadata": {}, 817 | "output_type": "execute_result" 818 | } 819 | ], 820 | "source": [ 821 | "l1" 822 | ] 823 | }, 824 | { 825 | "cell_type": "code", 826 | "execution_count": 63, 827 | "metadata": {}, 828 | "outputs": [ 829 | { 830 | "name": "stdout", 831 | "output_type": "stream", 832 | "text": [ 833 | "[(1, 5), (1, 3), (1, 9), (1, 7), (1, 13), (5, 3), (5, 9), (5, 7), (5, 13), (3, 9), (3, 7), (3, 13), (9, 7), (9, 13), (7, 13)]\n" 834 | ] 835 | } 836 | ], 837 | "source": [ 838 | "###Write a Python function to find a distinct pair\n", 839 | "#of numbers whose product is odd from a sequence of integer values. \n", 840 | "l1=[1,2,5,3,2,4,6,9,7,8,12,13] ##Given list\n", 841 | "n=len(l1)\n", 842 | "final_l=[]\n", 843 | "for i in range(n):\n", 844 | " a=l1[i]\n", 845 | " l=[a]\n", 846 | " if i=2:\n", 851 | " for i in range(1,len(l)):\n", 852 | " m1=l[0]\n", 853 | " m2=l[i]\n", 854 | " final_l.append(tuple([m1,m2]))\n", 855 | " \n", 856 | "print(final_l)" 857 | ] 858 | }, 859 | { 860 | "cell_type": "code", 861 | "execution_count": 64, 862 | "metadata": {}, 863 | "outputs": [ 864 | { 865 | "data": { 866 | "text/plain": [ 867 | "(2, 3)" 868 | ] 869 | }, 870 | "execution_count": 64, 871 | "metadata": {}, 872 | "output_type": "execute_result" 873 | } 874 | ], 875 | "source": [ 876 | "a=tuple([2,3])\n", 877 | "a" 878 | ] 879 | }, 880 | { 881 | "cell_type": "code", 882 | "execution_count": 1, 883 | "metadata": {}, 884 | "outputs": [ 885 | { 886 | "data": { 887 | "text/plain": [ 888 | "[-5, -1, 0, 10, 15, 17, 28, 40, 42, 75]" 889 | ] 890 | }, 891 | "execution_count": 1, 892 | "metadata": {}, 893 | "output_type": "execute_result" 894 | } 895 | ], 896 | "source": [ 897 | "### Code for sorting a list, Extend it to find min and max\n", 898 | "data=[0, 10, 15,-1, 40, -5, 42, 17, 28, 75]\n", 899 | "n=len(data)\n", 900 | "l=[]\n", 901 | "while len(l)list1[i]:\n", 1109 | " a=list1[i]\n", 1110 | "print(a)\n", 1111 | " " 1112 | ] 1113 | }, 1114 | { 1115 | "cell_type": "code", 1116 | "execution_count": 2, 1117 | "metadata": {}, 1118 | "outputs": [ 1119 | { 1120 | "name": "stdout", 1121 | "output_type": "stream", 1122 | "text": [ 1123 | "-10\n" 1124 | ] 1125 | } 1126 | ], 1127 | "source": [ 1128 | "list1=[25,-10,7,-3,-2,4,8,10]\n", 1129 | "n=len(list1)\n", 1130 | "a=list1[0]\n", 1131 | "for i in list1:\n", 1132 | " if a>i:\n", 1133 | " a=i\n", 1134 | "print(a)" 1135 | ] 1136 | }, 1137 | { 1138 | "cell_type": "code", 1139 | "execution_count": 1, 1140 | "metadata": {}, 1141 | "outputs": [ 1142 | { 1143 | "name": "stdout", 1144 | "output_type": "stream", 1145 | "text": [ 1146 | "[-10, -3, -2, 4, 7, 8, 10, 25]\n" 1147 | ] 1148 | } 1149 | ], 1150 | "source": [ 1151 | "list1=[25,-10,7,-3,-2,4,8,10]\n", 1152 | "n=len(list1)\n", 1153 | "sorted_l=[]\n", 1154 | "while len(sorted_l)i:\n", 1158 | " a=i\n", 1159 | " sorted_l.append(a)\n", 1160 | " list1.remove(a)\n", 1161 | "print(sorted_l)" 1162 | ] 1163 | }, 1164 | { 1165 | "cell_type": "code", 1166 | "execution_count": 14, 1167 | "metadata": {}, 1168 | "outputs": [ 1169 | { 1170 | "data": { 1171 | "text/plain": [ 1172 | "8" 1173 | ] 1174 | }, 1175 | "execution_count": 14, 1176 | "metadata": {}, 1177 | "output_type": "execute_result" 1178 | } 1179 | ], 1180 | "source": [ 1181 | "len(list1)" 1182 | ] 1183 | }, 1184 | { 1185 | "cell_type": "code", 1186 | "execution_count": 51, 1187 | "metadata": {}, 1188 | "outputs": [ 1189 | { 1190 | "data": { 1191 | "text/plain": [ 1192 | "[[], [4, 5, 6], [4], [4, 5], [4, 6], [5], [5, 6], [6]]" 1193 | ] 1194 | }, 1195 | "execution_count": 51, 1196 | "metadata": {}, 1197 | "output_type": "execute_result" 1198 | } 1199 | ], 1200 | "source": [ 1201 | "## finding possible set list from a given list \n", 1202 | "list1=[4,5,6]\n", 1203 | "n=len(list1)\n", 1204 | "l=[[],list1]\n", 1205 | "for i in range(n):\n", 1206 | " l.append(list((list1[i],)))\n", 1207 | " for j in range(i+1,n):\n", 1208 | " a=list((list1[i],list1[j]))\n", 1209 | " l.append(a)\n", 1210 | " \n", 1211 | "l " 1212 | ] 1213 | }, 1214 | { 1215 | "cell_type": "code", 1216 | "execution_count": 61, 1217 | "metadata": {}, 1218 | "outputs": [ 1219 | { 1220 | "data": { 1221 | "text/plain": [ 1222 | "[1, 2, 3, 4]" 1223 | ] 1224 | }, 1225 | "execution_count": 61, 1226 | "metadata": {}, 1227 | "output_type": "execute_result" 1228 | } 1229 | ], 1230 | "source": [ 1231 | "lll=[1,2,3]\n", 1232 | "lll.append(4)\n", 1233 | "lll" 1234 | ] 1235 | }, 1236 | { 1237 | "cell_type": "code", 1238 | "execution_count": 14, 1239 | "metadata": {}, 1240 | "outputs": [ 1241 | { 1242 | "data": { 1243 | "text/plain": [ 1244 | "28" 1245 | ] 1246 | }, 1247 | "execution_count": 14, 1248 | "metadata": {}, 1249 | "output_type": "execute_result" 1250 | } 1251 | ], 1252 | "source": [ 1253 | "len(l)" 1254 | ] 1255 | }, 1256 | { 1257 | "cell_type": "code", 1258 | "execution_count": 8, 1259 | "metadata": {}, 1260 | "outputs": [ 1261 | { 1262 | "data": { 1263 | "text/plain": [ 1264 | "[-7, -3, 2, 4, 8, 10]" 1265 | ] 1266 | }, 1267 | "execution_count": 8, 1268 | "metadata": {}, 1269 | "output_type": "execute_result" 1270 | } 1271 | ], 1272 | "source": [ 1273 | "list1.remove(l[0][0])\n", 1274 | "list1.remove(l[0][1])\n", 1275 | "list1" 1276 | ] 1277 | }, 1278 | { 1279 | "cell_type": "code", 1280 | "execution_count": 5, 1281 | "metadata": {}, 1282 | "outputs": [ 1283 | { 1284 | "name": "stdout", 1285 | "output_type": "stream", 1286 | "text": [ 1287 | "0.2\n", 1288 | "0.25\n", 1289 | "0.3333333333333333\n", 1290 | "0.5\n", 1291 | "sum = 1.2833333333333332\n" 1292 | ] 1293 | } 1294 | ], 1295 | "source": [ 1296 | "## Generating (1/5,1/4,1/3,1/2) ans finding sum\n", 1297 | "n=5\n", 1298 | "sm=0\n", 1299 | "while n>1:\n", 1300 | " print(1/n)\n", 1301 | " sm+=(1/n)\n", 1302 | " n=n-1\n", 1303 | "\n", 1304 | " \n", 1305 | "print('sum =',sm)" 1306 | ] 1307 | }, 1308 | { 1309 | "cell_type": "code", 1310 | "execution_count": 7, 1311 | "metadata": { 1312 | "collapsed": true 1313 | }, 1314 | "outputs": [ 1315 | { 1316 | "name": "stdout", 1317 | "output_type": "stream", 1318 | "text": [ 1319 | "0\n", 1320 | "1\n", 1321 | "2\n", 1322 | "3\n", 1323 | "4\n", 1324 | "6\n", 1325 | "7\n", 1326 | "8\n", 1327 | "9\n" 1328 | ] 1329 | } 1330 | ], 1331 | "source": [ 1332 | "for i in range(10):\n", 1333 | " if i==5:\n", 1334 | " continue\n", 1335 | " print(i)" 1336 | ] 1337 | }, 1338 | { 1339 | "cell_type": "code", 1340 | "execution_count": 14, 1341 | "metadata": {}, 1342 | "outputs": [], 1343 | "source": [ 1344 | "# factoril function (void type without return)\n", 1345 | "def fact_cal(n):\n", 1346 | " fact=1\n", 1347 | " while n>0:\n", 1348 | " fact=fact*n\n", 1349 | " n=n-1\n", 1350 | " print(fact)" 1351 | ] 1352 | }, 1353 | { 1354 | "cell_type": "code", 1355 | "execution_count": 18, 1356 | "metadata": {}, 1357 | "outputs": [ 1358 | { 1359 | "name": "stdout", 1360 | "output_type": "stream", 1361 | "text": [ 1362 | "24\n" 1363 | ] 1364 | }, 1365 | { 1366 | "data": { 1367 | "text/plain": [ 1368 | "NoneType" 1369 | ] 1370 | }, 1371 | "execution_count": 18, 1372 | "metadata": {}, 1373 | "output_type": "execute_result" 1374 | } 1375 | ], 1376 | "source": [ 1377 | "type(fact_cal(4))" 1378 | ] 1379 | }, 1380 | { 1381 | "cell_type": "code", 1382 | "execution_count": 17, 1383 | "metadata": {}, 1384 | "outputs": [], 1385 | "source": [ 1386 | "a" 1387 | ] 1388 | }, 1389 | { 1390 | "cell_type": "code", 1391 | "execution_count": 19, 1392 | "metadata": {}, 1393 | "outputs": [ 1394 | { 1395 | "name": "stdout", 1396 | "output_type": "stream", 1397 | "text": [ 1398 | "120\n", 1399 | "6\n", 1400 | "2\n" 1401 | ] 1402 | } 1403 | ], 1404 | "source": [ 1405 | "a=fact_cal(5)\n", 1406 | "b=fact_cal(5-2)\n", 1407 | "c=fact_cal(2)" 1408 | ] 1409 | }, 1410 | { 1411 | "cell_type": "code", 1412 | "execution_count": 20, 1413 | "metadata": {}, 1414 | "outputs": [ 1415 | { 1416 | "ename": "TypeError", 1417 | "evalue": "unsupported operand type(s) for *: 'NoneType' and 'NoneType'", 1418 | "output_type": "error", 1419 | "traceback": [ 1420 | "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", 1421 | "\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)", 1422 | "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mans\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0ma\u001b[0m\u001b[1;33m/\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mb\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mc\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2\u001b[0m \u001b[0mans\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", 1423 | "\u001b[1;31mTypeError\u001b[0m: unsupported operand type(s) for *: 'NoneType' and 'NoneType'" 1424 | ] 1425 | } 1426 | ], 1427 | "source": [ 1428 | "ans=a/(b*c)\n", 1429 | "ans" 1430 | ] 1431 | }, 1432 | { 1433 | "cell_type": "code", 1434 | "execution_count": 1, 1435 | "metadata": {}, 1436 | "outputs": [ 1437 | { 1438 | "name": "stdout", 1439 | "output_type": "stream", 1440 | "text": [ 1441 | "count of even is 5 and count of odd is 3\n" 1442 | ] 1443 | } 1444 | ], 1445 | "source": [ 1446 | "## Count even and odd number in a given list\n", 1447 | "list1=[2,3,4,5,6,78,9,10]\n", 1448 | "c_odd=0\n", 1449 | "c_even=0\n", 1450 | "for i in list1:\n", 1451 | " if i%2==0:\n", 1452 | " c_even=c_even+1 # c_even+=1\n", 1453 | " else:\n", 1454 | " c_odd=c_odd+1\n", 1455 | "\n", 1456 | "print('count of even is %d and count of odd is %d'%(c_even,c_odd)) " 1457 | ] 1458 | }, 1459 | { 1460 | "cell_type": "code", 1461 | "execution_count": 1, 1462 | "metadata": {}, 1463 | "outputs": [], 1464 | "source": [ 1465 | "## Write python program to make a new list from a given list which contain all the words with length greater than 3\n", 1466 | "l1=['bird','cat','sugar','ball','apple','map']\n", 1467 | "l2=[]\n", 1468 | "for i in l1:\n", 1469 | " if len(i)>3:\n", 1470 | " l2.append(i)\n", 1471 | " " 1472 | ] 1473 | }, 1474 | { 1475 | "cell_type": "code", 1476 | "execution_count": 2, 1477 | "metadata": {}, 1478 | "outputs": [ 1479 | { 1480 | "data": { 1481 | "text/plain": [ 1482 | "['bird', 'sugar', 'ball', 'apple']" 1483 | ] 1484 | }, 1485 | "execution_count": 2, 1486 | "metadata": {}, 1487 | "output_type": "execute_result" 1488 | } 1489 | ], 1490 | "source": [ 1491 | "l2" 1492 | ] 1493 | }, 1494 | { 1495 | "cell_type": "code", 1496 | "execution_count": 12, 1497 | "metadata": {}, 1498 | "outputs": [], 1499 | "source": [ 1500 | "# Write a Python function that takes two lists and returns True \n", 1501 | "##if they have at least one common member.\n", 1502 | "\n", 1503 | "def list_common(l1,l2):\n", 1504 | " l3=[]\n", 1505 | " for i in l1:\n", 1506 | " for j in l2:\n", 1507 | " if i==j:\n", 1508 | " l3.append(i)\n", 1509 | " return l3" 1510 | ] 1511 | }, 1512 | { 1513 | "cell_type": "code", 1514 | "execution_count": 14, 1515 | "metadata": {}, 1516 | "outputs": [ 1517 | { 1518 | "data": { 1519 | "text/plain": [ 1520 | "[2, 6, 6, 8, 9]" 1521 | ] 1522 | }, 1523 | "execution_count": 14, 1524 | "metadata": {}, 1525 | "output_type": "execute_result" 1526 | } 1527 | ], 1528 | "source": [ 1529 | "l1=[1,2,3,4,5,6,6,8,9]\n", 1530 | "l2=[6,2,7,8,9,]\n", 1531 | "list_common(l1,l2)" 1532 | ] 1533 | }, 1534 | { 1535 | "cell_type": "code", 1536 | "execution_count": 15, 1537 | "metadata": {}, 1538 | "outputs": [ 1539 | { 1540 | "name": "stdout", 1541 | "output_type": "stream", 1542 | "text": [ 1543 | "5\n" 1544 | ] 1545 | } 1546 | ], 1547 | "source": [ 1548 | "# Finding index position of any number (6 in this given list)\n", 1549 | "l1=[1,2,3,4,5,6,8,9]\n", 1550 | "for i in range(len(l1)):\n", 1551 | " if l1[i]==6:\n", 1552 | " print(i)" 1553 | ] 1554 | }, 1555 | { 1556 | "cell_type": "code", 1557 | "execution_count": 1, 1558 | "metadata": {}, 1559 | "outputs": [ 1560 | { 1561 | "data": { 1562 | "text/plain": [ 1563 | "[1, 3, 4, 2, 7]" 1564 | ] 1565 | }, 1566 | "execution_count": 1, 1567 | "metadata": {}, 1568 | "output_type": "execute_result" 1569 | } 1570 | ], 1571 | "source": [ 1572 | "## finding unique values from a given list\n", 1573 | "l1=[1,1,3,4,4,2,2,7]\n", 1574 | "l2=[]\n", 1575 | "for i in l1:\n", 1576 | " a=i\n", 1577 | " if a not in l2:\n", 1578 | " l2.append(a)\n", 1579 | "l2" 1580 | ] 1581 | }, 1582 | { 1583 | "cell_type": "markdown", 1584 | "metadata": {}, 1585 | "source": [ 1586 | "### Calculating Mean,Std.Dev, Median, Mode of a given list" 1587 | ] 1588 | }, 1589 | { 1590 | "cell_type": "markdown", 1591 | "metadata": {}, 1592 | "source": [ 1593 | "#### From statistica library in Python\n", 1594 | "https://docs.python.org/3/library/statistics.html" 1595 | ] 1596 | }, 1597 | { 1598 | "cell_type": "code", 1599 | "execution_count": 32, 1600 | "metadata": {}, 1601 | "outputs": [ 1602 | { 1603 | "data": { 1604 | "text/plain": [ 1605 | "[1, 2, 3, 3, 4, 5, 3, 6, 7, 8, 9, 3, 10]" 1606 | ] 1607 | }, 1608 | "execution_count": 32, 1609 | "metadata": {}, 1610 | "output_type": "execute_result" 1611 | } 1612 | ], 1613 | "source": [ 1614 | "list1=[1,2,3,3,4,5,3,6,7,8,9,3,10]\n", 1615 | "list1" 1616 | ] 1617 | }, 1618 | { 1619 | "cell_type": "code", 1620 | "execution_count": 33, 1621 | "metadata": {}, 1622 | "outputs": [ 1623 | { 1624 | "data": { 1625 | "text/plain": [ 1626 | "4" 1627 | ] 1628 | }, 1629 | "execution_count": 33, 1630 | "metadata": {}, 1631 | "output_type": "execute_result" 1632 | } 1633 | ], 1634 | "source": [ 1635 | "st.median(list1)" 1636 | ] 1637 | }, 1638 | { 1639 | "cell_type": "code", 1640 | "execution_count": 7, 1641 | "metadata": {}, 1642 | "outputs": [ 1643 | { 1644 | "data": { 1645 | "text/plain": [ 1646 | "[1, 2, 3, 3, 3, 3, 4, 5, 6, 7, 8, 9, 10]" 1647 | ] 1648 | }, 1649 | "execution_count": 7, 1650 | "metadata": {}, 1651 | "output_type": "execute_result" 1652 | } 1653 | ], 1654 | "source": [ 1655 | "list1.sort()\n", 1656 | "list1" 1657 | ] 1658 | }, 1659 | { 1660 | "cell_type": "code", 1661 | "execution_count": 12, 1662 | "metadata": {}, 1663 | "outputs": [ 1664 | { 1665 | "name": "stdout", 1666 | "output_type": "stream", 1667 | "text": [ 1668 | "Mean: 4.923076923076923\n", 1669 | "std_dev: 2.841992800294026\n" 1670 | ] 1671 | } 1672 | ], 1673 | "source": [ 1674 | "## Without using libray\n", 1675 | "##Mean\n", 1676 | "n=len(list1)\n", 1677 | "u=sum(list1)/n\n", 1678 | "print('Mean:',u)\n", 1679 | "##Standard Deviation\n", 1680 | "sm=0\n", 1681 | "for i in list1:\n", 1682 | " sm=sm+(i-u)**2\n", 1683 | " \n", 1684 | "std_dev=(sm/(n-1))**(0.5)\n", 1685 | "print('std_dev:',std_dev)" 1686 | ] 1687 | }, 1688 | { 1689 | "cell_type": "code", 1690 | "execution_count": 16, 1691 | "metadata": {}, 1692 | "outputs": [ 1693 | { 1694 | "name": "stdout", 1695 | "output_type": "stream", 1696 | "text": [ 1697 | "Median: 4\n" 1698 | ] 1699 | } 1700 | ], 1701 | "source": [ 1702 | "\n", 1703 | "## Median\n", 1704 | "n=len(list1)\n", 1705 | "if n%2==0:\n", 1706 | " a=(n-1)//2\n", 1707 | " b=a+1\n", 1708 | " median=(list1[a]+list1[b])*0.5\n", 1709 | " print('Median:',median)\n", 1710 | "else:\n", 1711 | " a=((n-1)+1)//2\n", 1712 | " median=list1[a]\n", 1713 | " print('Median:',median)" 1714 | ] 1715 | }, 1716 | { 1717 | "cell_type": "code", 1718 | "execution_count": 26, 1719 | "metadata": {}, 1720 | "outputs": [], 1721 | "source": [ 1722 | "## Mode\n", 1723 | "list1=[1,3,4,5,6,3,3,1,2,2,2,6]\n", 1724 | "list2=list(set(list1))\n", 1725 | "count=[]\n", 1726 | "for i in list2:\n", 1727 | " count.append(list1.count(i))\n", 1728 | "################################ \n", 1729 | "mode=[] \n", 1730 | "maxm=max(count)\n", 1731 | "for i in range(len(count)):\n", 1732 | " if count[i]==maxm:\n", 1733 | " mode.append(list2[i]) \n", 1734 | "#mode " 1735 | ] 1736 | }, 1737 | { 1738 | "cell_type": "code", 1739 | "execution_count": 27, 1740 | "metadata": {}, 1741 | "outputs": [ 1742 | { 1743 | "data": { 1744 | "text/plain": [ 1745 | "[2, 3, 3, 1, 1, 2]" 1746 | ] 1747 | }, 1748 | "execution_count": 27, 1749 | "metadata": {}, 1750 | "output_type": "execute_result" 1751 | } 1752 | ], 1753 | "source": [ 1754 | "count" 1755 | ] 1756 | }, 1757 | { 1758 | "cell_type": "code", 1759 | "execution_count": 22, 1760 | "metadata": {}, 1761 | "outputs": [ 1762 | { 1763 | "data": { 1764 | "text/plain": [ 1765 | "[1, 2, 3, 4, 5, 6]" 1766 | ] 1767 | }, 1768 | "execution_count": 22, 1769 | "metadata": {}, 1770 | "output_type": "execute_result" 1771 | } 1772 | ], 1773 | "source": [ 1774 | "list2" 1775 | ] 1776 | }, 1777 | { 1778 | "cell_type": "code", 1779 | "execution_count": 28, 1780 | "metadata": {}, 1781 | "outputs": [], 1782 | "source": [ 1783 | "import statistics as st" 1784 | ] 1785 | }, 1786 | { 1787 | "cell_type": "code", 1788 | "execution_count": 30, 1789 | "metadata": {}, 1790 | "outputs": [], 1791 | "source": [ 1792 | "list4=[1,3,4,5,6,3,3,1,2,2,6]" 1793 | ] 1794 | }, 1795 | { 1796 | "cell_type": "code", 1797 | "execution_count": 34, 1798 | "metadata": {}, 1799 | "outputs": [], 1800 | "source": [ 1801 | "list4.remove(3)" 1802 | ] 1803 | }, 1804 | { 1805 | "cell_type": "code", 1806 | "execution_count": 35, 1807 | "metadata": {}, 1808 | "outputs": [ 1809 | { 1810 | "data": { 1811 | "text/plain": [ 1812 | "[1, 4, 5, 6, 3, 3, 1, 2, 2, 6]" 1813 | ] 1814 | }, 1815 | "execution_count": 35, 1816 | "metadata": {}, 1817 | "output_type": "execute_result" 1818 | } 1819 | ], 1820 | "source": [ 1821 | "list4" 1822 | ] 1823 | }, 1824 | { 1825 | "cell_type": "code", 1826 | "execution_count": 36, 1827 | "metadata": {}, 1828 | "outputs": [ 1829 | { 1830 | "data": { 1831 | "text/plain": [ 1832 | "1" 1833 | ] 1834 | }, 1835 | "execution_count": 36, 1836 | "metadata": {}, 1837 | "output_type": "execute_result" 1838 | } 1839 | ], 1840 | "source": [ 1841 | "list4.pop(0)" 1842 | ] 1843 | }, 1844 | { 1845 | "cell_type": "code", 1846 | "execution_count": 37, 1847 | "metadata": {}, 1848 | "outputs": [ 1849 | { 1850 | "data": { 1851 | "text/plain": [ 1852 | "[4, 5, 6, 3, 3, 1, 2, 2, 6]" 1853 | ] 1854 | }, 1855 | "execution_count": 37, 1856 | "metadata": {}, 1857 | "output_type": "execute_result" 1858 | } 1859 | ], 1860 | "source": [ 1861 | "list4" 1862 | ] 1863 | }, 1864 | { 1865 | "cell_type": "code", 1866 | "execution_count": 7, 1867 | "metadata": {}, 1868 | "outputs": [], 1869 | "source": [ 1870 | "def fact_cal(n):\n", 1871 | " fact=1\n", 1872 | " while n>0:\n", 1873 | " fact=fact*n\n", 1874 | " n=n-1\n", 1875 | " return(fact)" 1876 | ] 1877 | }, 1878 | { 1879 | "cell_type": "code", 1880 | "execution_count": 9, 1881 | "metadata": {}, 1882 | "outputs": [ 1883 | { 1884 | "name": "stdout", 1885 | "output_type": "stream", 1886 | "text": [ 1887 | "2.7182818284590455\n" 1888 | ] 1889 | } 1890 | ], 1891 | "source": [ 1892 | "## finding value of e^x when x=1\n", 1893 | "sm=0\n", 1894 | "for i in range(101):\n", 1895 | " sm=sm+(1/fact_cal(i))\n", 1896 | "print(sm) " 1897 | ] 1898 | }, 1899 | { 1900 | "cell_type": "code", 1901 | "execution_count": 1, 1902 | "metadata": {}, 1903 | "outputs": [ 1904 | { 1905 | "name": "stdout", 1906 | "output_type": "stream", 1907 | "text": [ 1908 | "FIZZ\n", 1909 | "BUZZ\n", 1910 | "7\n", 1911 | "FiZZBUZZ\n", 1912 | "FIZZ\n", 1913 | "FiZZBUZZ\n" 1914 | ] 1915 | } 1916 | ], 1917 | "source": [ 1918 | "list1=[3,10,7,15,24,75]\n", 1919 | "for i in list1:\n", 1920 | " if i%3==0 and i%5==0:\n", 1921 | " print('FiZZBUZZ')\n", 1922 | " elif i%3==0:\n", 1923 | " print('FIZZ')\n", 1924 | " elif i%5==0:\n", 1925 | " print('BUZZ')\n", 1926 | " else:\n", 1927 | " print(i)" 1928 | ] 1929 | }, 1930 | { 1931 | "cell_type": "markdown", 1932 | "metadata": {}, 1933 | "source": [ 1934 | "#### BEST OF LUCK!!!" 1935 | ] 1936 | } 1937 | ], 1938 | "metadata": { 1939 | "kernelspec": { 1940 | "display_name": "Python 3", 1941 | "language": "python", 1942 | "name": "python3" 1943 | }, 1944 | "language_info": { 1945 | "codemirror_mode": { 1946 | "name": "ipython", 1947 | "version": 3 1948 | }, 1949 | "file_extension": ".py", 1950 | "mimetype": "text/x-python", 1951 | "name": "python", 1952 | "nbconvert_exporter": "python", 1953 | "pygments_lexer": "ipython3", 1954 | "version": "3.7.1" 1955 | } 1956 | }, 1957 | "nbformat": 4, 1958 | "nbformat_minor": 2 1959 | } 1960 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### Python_Starter 2 | 3 | #### This is my attempt to make a one-stop Python Quick Start learning repository for any beginners in Data Science. I have tried to comment as much as possible for clarification of each syntax like a book, still keeping it short so that anyone can cover it in a short period. 4 | #### I am still working on it. Few files are not updated and their status have been written in the bracket. These files are being updated and you will see it soon. 5 | #### The following are the modules I have made. It would be better if covered/learned in order of precedence as given below. 6 | * (1) Python Basics 7 | * (2) Tuple_List_Dictionary_Ramen 8 | * (3) Few Selected Topics in Python 9 | * (4) OOPS (Object Oriented Programming) 10 | * (5) OOPS_PLUS (Will be added) 11 | * (6) Numpy_Ramen 12 | * (7) pandas- Starter_Series_DataFrame 13 | * (8) Python_Plotting and Visualization :Matplotlib_Starter/Seaborn/Plottly 14 | * (9) pandas-Data Cleaning & Processing I 15 | * (10) Groupby and aggregation 16 | * (11) pivot_table and crosstab (Will be updated) 17 | * (12) pandas-Join_combine_Reshape (Will be updated) 18 | * (13) Few Selected Operations in padas (Will be added) 19 | 20 | 21 | -------------------------------------------------------------------------------- /Tuple_List_Dictionary_Ramen.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "### Tuple\n", 8 | "* Coma seperated sequence of numbers or any characters with or without parenthesis." 9 | ] 10 | }, 11 | { 12 | "cell_type": "code", 13 | "execution_count": 3, 14 | "metadata": {}, 15 | "outputs": [ 16 | { 17 | "name": "stdout", 18 | "output_type": "stream", 19 | "text": [ 20 | "(4, 5, 6)\n", 21 | "(55, 66, 77)\n" 22 | ] 23 | }, 24 | { 25 | "data": { 26 | "text/plain": [ 27 | "('a', 3, 'b', 'c')" 28 | ] 29 | }, 30 | "execution_count": 3, 31 | "metadata": {}, 32 | "output_type": "execute_result" 33 | } 34 | ], 35 | "source": [ 36 | "T1 = 4, 5, 6 # Without parenthesis\n", 37 | "print(T1)\n", 38 | "T2=(55,66,77) # With paranthesis\n", 39 | "print(T2) \n", 40 | "T3='a',3,'b','c' # Mixed Data Type string and integer\n", 41 | "T3" 42 | ] 43 | }, 44 | { 45 | "cell_type": "markdown", 46 | "metadata": {}, 47 | "source": [ 48 | "We can see, result will be always with parenthesis." 49 | ] 50 | }, 51 | { 52 | "cell_type": "code", 53 | "execution_count": 3, 54 | "metadata": {}, 55 | "outputs": [ 56 | { 57 | "data": { 58 | "text/plain": [ 59 | "('a', 3, 'b', 'c')" 60 | ] 61 | }, 62 | "execution_count": 3, 63 | "metadata": {}, 64 | "output_type": "execute_result" 65 | } 66 | ], 67 | "source": [ 68 | "astr='a',3,'b','c'\n", 69 | "astr" 70 | ] 71 | }, 72 | { 73 | "cell_type": "code", 74 | "execution_count": 1, 75 | "metadata": {}, 76 | "outputs": [], 77 | "source": [ 78 | "w=('7','a')" 79 | ] 80 | }, 81 | { 82 | "cell_type": "code", 83 | "execution_count": 2, 84 | "metadata": {}, 85 | "outputs": [ 86 | { 87 | "data": { 88 | "text/plain": [ 89 | "tuple" 90 | ] 91 | }, 92 | "execution_count": 2, 93 | "metadata": {}, 94 | "output_type": "execute_result" 95 | } 96 | ], 97 | "source": [ 98 | "#checking type\n", 99 | "type(w) # return the type of data " 100 | ] 101 | }, 102 | { 103 | "cell_type": "code", 104 | "execution_count": 3, 105 | "metadata": {}, 106 | "outputs": [ 107 | { 108 | "data": { 109 | "text/plain": [ 110 | "((4, 5, 6), (7, 8))" 111 | ] 112 | }, 113 | "execution_count": 3, 114 | "metadata": {}, 115 | "output_type": "execute_result" 116 | } 117 | ], 118 | "source": [ 119 | "r1 = ((4, 5, 6), (7, 8))\n", 120 | "r1" 121 | ] 122 | }, 123 | { 124 | "cell_type": "code", 125 | "execution_count": 10, 126 | "metadata": {}, 127 | "outputs": [ 128 | { 129 | "data": { 130 | "text/plain": [ 131 | "[4, 0, 2]" 132 | ] 133 | }, 134 | "execution_count": 10, 135 | "metadata": {}, 136 | "output_type": "execute_result" 137 | } 138 | ], 139 | "source": [ 140 | "l1=[4, 0, 2] # this is list> coma seperated items inside square bracket\n", 141 | "l1" 142 | ] 143 | }, 144 | { 145 | "cell_type": "code", 146 | "execution_count": 11, 147 | "metadata": {}, 148 | "outputs": [ 149 | { 150 | "data": { 151 | "text/plain": [ 152 | "(4, 0, 2)" 153 | ] 154 | }, 155 | "execution_count": 11, 156 | "metadata": {}, 157 | "output_type": "execute_result" 158 | } 159 | ], 160 | "source": [ 161 | "az=tuple(l1)\n", 162 | "az" 163 | ] 164 | }, 165 | { 166 | "cell_type": "code", 167 | "execution_count": 103, 168 | "metadata": {}, 169 | "outputs": [ 170 | { 171 | "data": { 172 | "text/plain": [ 173 | "4" 174 | ] 175 | }, 176 | "execution_count": 103, 177 | "metadata": {}, 178 | "output_type": "execute_result" 179 | } 180 | ], 181 | "source": [ 182 | "az[0]" 183 | ] 184 | }, 185 | { 186 | "cell_type": "code", 187 | "execution_count": 35, 188 | "metadata": { 189 | "collapsed": true 190 | }, 191 | "outputs": [ 192 | { 193 | "ename": "TypeError", 194 | "evalue": "'tuple' object does not support item assignment", 195 | "output_type": "error", 196 | "traceback": [ 197 | "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", 198 | "\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)", 199 | "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0maz\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m99\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m", 200 | "\u001b[1;31mTypeError\u001b[0m: 'tuple' object does not support item assignment" 201 | ] 202 | } 203 | ], 204 | "source": [ 205 | "az[0]=99 ## Immutability " 206 | ] 207 | }, 208 | { 209 | "cell_type": "code", 210 | "execution_count": 104, 211 | "metadata": {}, 212 | "outputs": [ 213 | { 214 | "data": { 215 | "text/plain": [ 216 | "('E', 'l', 'e', 'p', 'h', 'a', 'n', 't')" 217 | ] 218 | }, 219 | "execution_count": 104, 220 | "metadata": {}, 221 | "output_type": "execute_result" 222 | } 223 | ], 224 | "source": [ 225 | "tup = tuple('Elephant')\n", 226 | "tup" 227 | ] 228 | }, 229 | { 230 | "cell_type": "code", 231 | "execution_count": 105, 232 | "metadata": {}, 233 | "outputs": [ 234 | { 235 | "data": { 236 | "text/plain": [ 237 | "'E'" 238 | ] 239 | }, 240 | "execution_count": 105, 241 | "metadata": {}, 242 | "output_type": "execute_result" 243 | } 244 | ], 245 | "source": [ 246 | "tup[0]" 247 | ] 248 | }, 249 | { 250 | "cell_type": "code", 251 | "execution_count": 36, 252 | "metadata": {}, 253 | "outputs": [ 254 | { 255 | "data": { 256 | "text/plain": [ 257 | "('fast', [1, 2], True)" 258 | ] 259 | }, 260 | "execution_count": 36, 261 | "metadata": {}, 262 | "output_type": "execute_result" 263 | } 264 | ], 265 | "source": [ 266 | "tup = tuple(['fast', [1, 2], True])\n", 267 | "tup" 268 | ] 269 | }, 270 | { 271 | "cell_type": "code", 272 | "execution_count": 9, 273 | "metadata": {}, 274 | "outputs": [ 275 | { 276 | "data": { 277 | "text/plain": [ 278 | "True" 279 | ] 280 | }, 281 | "execution_count": 9, 282 | "metadata": {}, 283 | "output_type": "execute_result" 284 | } 285 | ], 286 | "source": [ 287 | "tup[2]" 288 | ] 289 | }, 290 | { 291 | "cell_type": "code", 292 | "execution_count": 11, 293 | "metadata": { 294 | "collapsed": true 295 | }, 296 | "outputs": [ 297 | { 298 | "ename": "TypeError", 299 | "evalue": "'tuple' object does not support item assignment", 300 | "output_type": "error", 301 | "traceback": [ 302 | "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", 303 | "\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)", 304 | "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mtup\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m]\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;34m'False'\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m", 305 | "\u001b[1;31mTypeError\u001b[0m: 'tuple' object does not support item assignment" 306 | ] 307 | } 308 | ], 309 | "source": [ 310 | "tup[2] = False" 311 | ] 312 | }, 313 | { 314 | "cell_type": "code", 315 | "execution_count": 15, 316 | "metadata": { 317 | "collapsed": true 318 | }, 319 | "outputs": [ 320 | { 321 | "ename": "AttributeError", 322 | "evalue": "'bool' object has no attribute 'append'", 323 | "output_type": "error", 324 | "traceback": [ 325 | "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", 326 | "\u001b[1;31mAttributeError\u001b[0m Traceback (most recent call last)", 327 | "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mtup\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2\u001b[0m \u001b[0mtup\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", 328 | "\u001b[1;31mAttributeError\u001b[0m: 'bool' object has no attribute 'append'" 329 | ] 330 | } 331 | ], 332 | "source": [ 333 | "tup[2].append(2)\n", 334 | "tup" 335 | ] 336 | }, 337 | { 338 | "cell_type": "code", 339 | "execution_count": 16, 340 | "metadata": {}, 341 | "outputs": [ 342 | { 343 | "data": { 344 | "text/plain": [ 345 | "('foo', [1, 2, 3], True)" 346 | ] 347 | }, 348 | "execution_count": 16, 349 | "metadata": {}, 350 | "output_type": "execute_result" 351 | } 352 | ], 353 | "source": [ 354 | "tup[1].append(3)\n", 355 | "tup" 356 | ] 357 | }, 358 | { 359 | "cell_type": "code", 360 | "execution_count": 20, 361 | "metadata": { 362 | "collapsed": true 363 | }, 364 | "outputs": [ 365 | { 366 | "ename": "AttributeError", 367 | "evalue": "'str' object has no attribute 'append'", 368 | "output_type": "error", 369 | "traceback": [ 370 | "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", 371 | "\u001b[1;31mAttributeError\u001b[0m Traceback (most recent call last)", 372 | "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mtup\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m3\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2\u001b[0m \u001b[0mtup\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", 373 | "\u001b[1;31mAttributeError\u001b[0m: 'str' object has no attribute 'append'" 374 | ] 375 | } 376 | ], 377 | "source": [ 378 | "tup[0].append(3)\n", 379 | "tup" 380 | ] 381 | }, 382 | { 383 | "cell_type": "code", 384 | "execution_count": 4, 385 | "metadata": {}, 386 | "outputs": [], 387 | "source": [ 388 | "x1=(4, None, 'foo')\n", 389 | "x2=(6, 0)\n", 390 | "x3=('bar',)\n", 391 | "XX=x1+x2+x3" 392 | ] 393 | }, 394 | { 395 | "cell_type": "code", 396 | "execution_count": 5, 397 | "metadata": {}, 398 | "outputs": [ 399 | { 400 | "data": { 401 | "text/plain": [ 402 | "(4, None, 'foo')" 403 | ] 404 | }, 405 | "execution_count": 5, 406 | "metadata": {}, 407 | "output_type": "execute_result" 408 | } 409 | ], 410 | "source": [ 411 | "x1" 412 | ] 413 | }, 414 | { 415 | "cell_type": "code", 416 | "execution_count": 7, 417 | "metadata": {}, 418 | "outputs": [ 419 | { 420 | "data": { 421 | "text/plain": [ 422 | "(4, None, 'foo', 6, 0, 'bar')" 423 | ] 424 | }, 425 | "execution_count": 7, 426 | "metadata": {}, 427 | "output_type": "execute_result" 428 | } 429 | ], 430 | "source": [ 431 | "XX" 432 | ] 433 | }, 434 | { 435 | "cell_type": "code", 436 | "execution_count": 112, 437 | "metadata": {}, 438 | "outputs": [ 439 | { 440 | "data": { 441 | "text/plain": [ 442 | "(4, None, 'foo', 6, 0, 'bar')" 443 | ] 444 | }, 445 | "execution_count": 112, 446 | "metadata": {}, 447 | "output_type": "execute_result" 448 | } 449 | ], 450 | "source": [ 451 | "(4, None, 'foo') + (6, 0) + ('bar',) ## Tuple concatenation" 452 | ] 453 | }, 454 | { 455 | "cell_type": "markdown", 456 | "metadata": {}, 457 | "source": [ 458 | "#### Unpacking tuples" 459 | ] 460 | }, 461 | { 462 | "cell_type": "code", 463 | "execution_count": 8, 464 | "metadata": {}, 465 | "outputs": [], 466 | "source": [ 467 | "tup = (4, 5, 6)\n", 468 | "a, b, c = tup" 469 | ] 470 | }, 471 | { 472 | "cell_type": "code", 473 | "execution_count": 9, 474 | "metadata": {}, 475 | "outputs": [ 476 | { 477 | "data": { 478 | "text/plain": [ 479 | "5" 480 | ] 481 | }, 482 | "execution_count": 9, 483 | "metadata": {}, 484 | "output_type": "execute_result" 485 | } 486 | ], 487 | "source": [ 488 | "b" 489 | ] 490 | }, 491 | { 492 | "cell_type": "code", 493 | "execution_count": 11, 494 | "metadata": {}, 495 | "outputs": [ 496 | { 497 | "name": "stdout", 498 | "output_type": "stream", 499 | "text": [ 500 | "1\n", 501 | "4\n", 502 | "7\n" 503 | ] 504 | } 505 | ], 506 | "source": [ 507 | "seq = [(1, 2, 3), (4, 5, 6), (7, 8, 9)]\n", 508 | "for i in seq:\n", 509 | " print(i[0])\n", 510 | " #print(i)" 511 | ] 512 | }, 513 | { 514 | "cell_type": "code", 515 | "execution_count": 120, 516 | "metadata": {}, 517 | "outputs": [ 518 | { 519 | "name": "stdout", 520 | "output_type": "stream", 521 | "text": [ 522 | "a=1, b=2, c=3\n", 523 | "a=4, b=5, c=6\n", 524 | "a=7, b=8, c=9\n" 525 | ] 526 | } 527 | ], 528 | "source": [ 529 | "seq = [(1, 2, 3), (4, 5, 6), (7, 8, 9)]\n", 530 | "for a,b,c in seq:\n", 531 | " print('a={0}, b={1}, c={2}'.format(a, b, c))" 532 | ] 533 | }, 534 | { 535 | "cell_type": "code", 536 | "execution_count": 12, 537 | "metadata": {}, 538 | "outputs": [ 539 | { 540 | "data": { 541 | "text/plain": [ 542 | "[3, 4, 5]" 543 | ] 544 | }, 545 | "execution_count": 12, 546 | "metadata": {}, 547 | "output_type": "execute_result" 548 | } 549 | ], 550 | "source": [ 551 | "values = 1, 2, 3, 4, 5\n", 552 | "a, b, *remain = values\n", 553 | "a, b\n", 554 | "remain # remaining member after a and b, return as list assigned in variable rest" 555 | ] 556 | }, 557 | { 558 | "cell_type": "markdown", 559 | "metadata": {}, 560 | "source": [ 561 | "#### Tuple methods" 562 | ] 563 | }, 564 | { 565 | "cell_type": "code", 566 | "execution_count": 158, 567 | "metadata": {}, 568 | "outputs": [ 569 | { 570 | "data": { 571 | "text/plain": [ 572 | "4" 573 | ] 574 | }, 575 | "execution_count": 158, 576 | "metadata": {}, 577 | "output_type": "execute_result" 578 | } 579 | ], 580 | "source": [ 581 | "a = (1, 2, 2, 2, 3, 4, 2)\n", 582 | "a.count(2)" 583 | ] 584 | }, 585 | { 586 | "cell_type": "code", 587 | "execution_count": 134, 588 | "metadata": {}, 589 | "outputs": [ 590 | { 591 | "data": { 592 | "text/plain": [ 593 | "16" 594 | ] 595 | }, 596 | "execution_count": 134, 597 | "metadata": {}, 598 | "output_type": "execute_result" 599 | } 600 | ], 601 | "source": [ 602 | "sum(a)" 603 | ] 604 | }, 605 | { 606 | "cell_type": "code", 607 | "execution_count": 33, 608 | "metadata": {}, 609 | "outputs": [ 610 | { 611 | "data": { 612 | "text/plain": [ 613 | "7" 614 | ] 615 | }, 616 | "execution_count": 33, 617 | "metadata": {}, 618 | "output_type": "execute_result" 619 | } 620 | ], 621 | "source": [ 622 | "len(a)" 623 | ] 624 | }, 625 | { 626 | "cell_type": "markdown", 627 | "metadata": {}, 628 | "source": [ 629 | "### List" 630 | ] 631 | }, 632 | { 633 | "cell_type": "code", 634 | "execution_count": 132, 635 | "metadata": {}, 636 | "outputs": [ 637 | { 638 | "data": { 639 | "text/plain": [ 640 | "[2, 3, 7, 'None']" 641 | ] 642 | }, 643 | "execution_count": 132, 644 | "metadata": {}, 645 | "output_type": "execute_result" 646 | } 647 | ], 648 | "source": [ 649 | "a1 = [2, 3, 7, 'None']\n", 650 | "a1" 651 | ] 652 | }, 653 | { 654 | "cell_type": "code", 655 | "execution_count": null, 656 | "metadata": {}, 657 | "outputs": [], 658 | "source": [] 659 | }, 660 | { 661 | "cell_type": "code", 662 | "execution_count": 21, 663 | "metadata": {}, 664 | "outputs": [ 665 | { 666 | "data": { 667 | "text/plain": [ 668 | "['full', 'half', 'quarter']" 669 | ] 670 | }, 671 | "execution_count": 21, 672 | "metadata": {}, 673 | "output_type": "execute_result" 674 | } 675 | ], 676 | "source": [ 677 | "tup = ('full', 'half', 'quarter')\n", 678 | "b = list(tup)\n", 679 | "b" 680 | ] 681 | }, 682 | { 683 | "cell_type": "code", 684 | "execution_count": 22, 685 | "metadata": {}, 686 | "outputs": [ 687 | { 688 | "data": { 689 | "text/plain": [ 690 | "[\"can't handle\", 'half', 'quarter']" 691 | ] 692 | }, 693 | "execution_count": 22, 694 | "metadata": {}, 695 | "output_type": "execute_result" 696 | } 697 | ], 698 | "source": [ 699 | "b[0] = \"can't handle\" ## List is mutable\n", 700 | "b" 701 | ] 702 | }, 703 | { 704 | "cell_type": "code", 705 | "execution_count": 13, 706 | "metadata": {}, 707 | "outputs": [ 708 | { 709 | "data": { 710 | "text/plain": [ 711 | "range(0, 10)" 712 | ] 713 | }, 714 | "execution_count": 13, 715 | "metadata": {}, 716 | "output_type": "execute_result" 717 | } 718 | ], 719 | "source": [ 720 | "range(10)" 721 | ] 722 | }, 723 | { 724 | "cell_type": "code", 725 | "execution_count": 140, 726 | "metadata": {}, 727 | "outputs": [ 728 | { 729 | "data": { 730 | "text/plain": [ 731 | "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]" 732 | ] 733 | }, 734 | "execution_count": 140, 735 | "metadata": {}, 736 | "output_type": "execute_result" 737 | } 738 | ], 739 | "source": [ 740 | "g = range(10)\n", 741 | "g\n", 742 | "list(g)" 743 | ] 744 | }, 745 | { 746 | "cell_type": "markdown", 747 | "metadata": {}, 748 | "source": [ 749 | "### Adding and removing elements" 750 | ] 751 | }, 752 | { 753 | "cell_type": "code", 754 | "execution_count": 23, 755 | "metadata": {}, 756 | "outputs": [ 757 | { 758 | "data": { 759 | "text/plain": [ 760 | "[\"can't handle\", 'half', 'quarter', \"Teacher's\"]" 761 | ] 762 | }, 763 | "execution_count": 23, 764 | "metadata": {}, 765 | "output_type": "execute_result" 766 | } 767 | ], 768 | "source": [ 769 | "b.append(\"Teacher's\")\n", 770 | "b" 771 | ] 772 | }, 773 | { 774 | "cell_type": "code", 775 | "execution_count": 24, 776 | "metadata": {}, 777 | "outputs": [ 778 | { 779 | "data": { 780 | "text/plain": [ 781 | "[\"can't handle\", 'red label', 'half', 'quarter', \"Teacher's\"]" 782 | ] 783 | }, 784 | "execution_count": 24, 785 | "metadata": {}, 786 | "output_type": "execute_result" 787 | } 788 | ], 789 | "source": [ 790 | "b.insert(1, 'red label')\n", 791 | "b" 792 | ] 793 | }, 794 | { 795 | "cell_type": "code", 796 | "execution_count": 25, 797 | "metadata": {}, 798 | "outputs": [ 799 | { 800 | "data": { 801 | "text/plain": [ 802 | "[\"can't handle\", 'red label', 'quarter', \"Teacher's\"]" 803 | ] 804 | }, 805 | "execution_count": 25, 806 | "metadata": {}, 807 | "output_type": "execute_result" 808 | } 809 | ], 810 | "source": [ 811 | "b.pop(2)\n", 812 | "b" 813 | ] 814 | }, 815 | { 816 | "cell_type": "code", 817 | "execution_count": 26, 818 | "metadata": {}, 819 | "outputs": [ 820 | { 821 | "data": { 822 | "text/plain": [ 823 | "[\"can't handle\", 'red label', 'quarter', \"Teacher's\", 'like']" 824 | ] 825 | }, 826 | "execution_count": 26, 827 | "metadata": {}, 828 | "output_type": "execute_result" 829 | } 830 | ], 831 | "source": [ 832 | "b.append('like')\n", 833 | "b" 834 | ] 835 | }, 836 | { 837 | "cell_type": "code", 838 | "execution_count": 27, 839 | "metadata": {}, 840 | "outputs": [ 841 | { 842 | "data": { 843 | "text/plain": [ 844 | "[\"can't handle\", 'red label', 'quarter', \"Teacher's\"]" 845 | ] 846 | }, 847 | "execution_count": 27, 848 | "metadata": {}, 849 | "output_type": "execute_result" 850 | } 851 | ], 852 | "source": [ 853 | "b.remove('like')\n", 854 | "b" 855 | ] 856 | }, 857 | { 858 | "cell_type": "code", 859 | "execution_count": 60, 860 | "metadata": {}, 861 | "outputs": [ 862 | { 863 | "data": { 864 | "text/plain": [ 865 | "True" 866 | ] 867 | }, 868 | "execution_count": 60, 869 | "metadata": {}, 870 | "output_type": "execute_result" 871 | } 872 | ], 873 | "source": [ 874 | "'red label' in b" 875 | ] 876 | }, 877 | { 878 | "cell_type": "code", 879 | "execution_count": 61, 880 | "metadata": {}, 881 | "outputs": [ 882 | { 883 | "data": { 884 | "text/plain": [ 885 | "True" 886 | ] 887 | }, 888 | "execution_count": 61, 889 | "metadata": {}, 890 | "output_type": "execute_result" 891 | } 892 | ], 893 | "source": [ 894 | "'like' not in b_list" 895 | ] 896 | }, 897 | { 898 | "cell_type": "markdown", 899 | "metadata": {}, 900 | "source": [ 901 | "### Concatenating and combining lists" 902 | ] 903 | }, 904 | { 905 | "cell_type": "code", 906 | "execution_count": 44, 907 | "metadata": {}, 908 | "outputs": [ 909 | { 910 | "data": { 911 | "text/plain": [ 912 | "[4, None, 'foo', 7, 8, (2, 3)]" 913 | ] 914 | }, 915 | "execution_count": 44, 916 | "metadata": {}, 917 | "output_type": "execute_result" 918 | } 919 | ], 920 | "source": [ 921 | "[4, None, 'foo'] + [7, 8, (2, 3)]" 922 | ] 923 | }, 924 | { 925 | "cell_type": "code", 926 | "execution_count": 46, 927 | "metadata": {}, 928 | "outputs": [ 929 | { 930 | "data": { 931 | "text/plain": [ 932 | "[4, None, 'ful', 7, 8, (2, 3)]" 933 | ] 934 | }, 935 | "execution_count": 46, 936 | "metadata": {}, 937 | "output_type": "execute_result" 938 | } 939 | ], 940 | "source": [ 941 | "x = [4, None, 'ful']\n", 942 | "x.extend([7, 8, (2, 3)]) ## Same as adding\n", 943 | "x" 944 | ] 945 | }, 946 | { 947 | "cell_type": "markdown", 948 | "metadata": {}, 949 | "source": [ 950 | "#### Sorting" 951 | ] 952 | }, 953 | { 954 | "cell_type": "code", 955 | "execution_count": 62, 956 | "metadata": {}, 957 | "outputs": [ 958 | { 959 | "data": { 960 | "text/plain": [ 961 | "[1, 2, 3, 5, 7]" 962 | ] 963 | }, 964 | "execution_count": 62, 965 | "metadata": {}, 966 | "output_type": "execute_result" 967 | } 968 | ], 969 | "source": [ 970 | "a = [7, 2, 5, 1, 3]\n", 971 | "a.sort()\n", 972 | "a" 973 | ] 974 | }, 975 | { 976 | "cell_type": "code", 977 | "execution_count": 144, 978 | "metadata": {}, 979 | "outputs": [ 980 | { 981 | "data": { 982 | "text/plain": [ 983 | "['He', 'foxes', 'saw', 'six', 'small']" 984 | ] 985 | }, 986 | "execution_count": 144, 987 | "metadata": {}, 988 | "output_type": "execute_result" 989 | } 990 | ], 991 | "source": [ 992 | "b = ['saw', 'small', 'He', 'foxes', 'six']\n", 993 | "b.sort()# sort in alphabetical order\n", 994 | "b" 995 | ] 996 | }, 997 | { 998 | "cell_type": "code", 999 | "execution_count": 143, 1000 | "metadata": {}, 1001 | "outputs": [ 1002 | { 1003 | "data": { 1004 | "text/plain": [ 1005 | "['He', 'saw', 'six', 'small', 'foxes']" 1006 | ] 1007 | }, 1008 | "execution_count": 143, 1009 | "metadata": {}, 1010 | "output_type": "execute_result" 1011 | } 1012 | ], 1013 | "source": [ 1014 | "b = ['saw', 'small', 'He', 'foxes', 'six']\n", 1015 | "b.sort(key=len) ## Sort according to lenth of each elements\n", 1016 | "b" 1017 | ] 1018 | }, 1019 | { 1020 | "cell_type": "markdown", 1021 | "metadata": {}, 1022 | "source": [ 1023 | "#### Slicing" 1024 | ] 1025 | }, 1026 | { 1027 | "cell_type": "code", 1028 | "execution_count": 42, 1029 | "metadata": {}, 1030 | "outputs": [ 1031 | { 1032 | "data": { 1033 | "text/plain": [ 1034 | "[2, 3, 7, 5]" 1035 | ] 1036 | }, 1037 | "execution_count": 42, 1038 | "metadata": {}, 1039 | "output_type": "execute_result" 1040 | } 1041 | ], 1042 | "source": [ 1043 | "set1 = [7, 2, 3, 7, 5, 6, 0, 1]\n", 1044 | "set1[1:5]" 1045 | ] 1046 | }, 1047 | { 1048 | "cell_type": "code", 1049 | "execution_count": 43, 1050 | "metadata": {}, 1051 | "outputs": [ 1052 | { 1053 | "data": { 1054 | "text/plain": [ 1055 | "[7, 2, 3, 6, 3, 6, 0, 1]" 1056 | ] 1057 | }, 1058 | "execution_count": 43, 1059 | "metadata": {}, 1060 | "output_type": "execute_result" 1061 | } 1062 | ], 1063 | "source": [ 1064 | "set1[3:5] = [6,3]\n", 1065 | "set1" 1066 | ] 1067 | }, 1068 | { 1069 | "cell_type": "code", 1070 | "execution_count": 39, 1071 | "metadata": {}, 1072 | "outputs": [ 1073 | { 1074 | "data": { 1075 | "text/plain": [ 1076 | "[7, 2, 3, 6, 3, 3, 6, 0, 1]" 1077 | ] 1078 | }, 1079 | "execution_count": 39, 1080 | "metadata": {}, 1081 | "output_type": "execute_result" 1082 | } 1083 | ], 1084 | "source": [ 1085 | "#set1[3:4] = [6,3]\n", 1086 | "#set1 ### What is happening check yourself?" 1087 | ] 1088 | }, 1089 | { 1090 | "cell_type": "code", 1091 | "execution_count": 44, 1092 | "metadata": {}, 1093 | "outputs": [ 1094 | { 1095 | "data": { 1096 | "text/plain": [ 1097 | "[7, 2, 3, 6, 3]" 1098 | ] 1099 | }, 1100 | "execution_count": 44, 1101 | "metadata": {}, 1102 | "output_type": "execute_result" 1103 | } 1104 | ], 1105 | "source": [ 1106 | "set1[:5]" 1107 | ] 1108 | }, 1109 | { 1110 | "cell_type": "code", 1111 | "execution_count": 45, 1112 | "metadata": {}, 1113 | "outputs": [ 1114 | { 1115 | "data": { 1116 | "text/plain": [ 1117 | "[6, 3, 6, 0, 1]" 1118 | ] 1119 | }, 1120 | "execution_count": 45, 1121 | "metadata": {}, 1122 | "output_type": "execute_result" 1123 | } 1124 | ], 1125 | "source": [ 1126 | "set1[3:]" 1127 | ] 1128 | }, 1129 | { 1130 | "cell_type": "code", 1131 | "execution_count": 68, 1132 | "metadata": {}, 1133 | "outputs": [ 1134 | { 1135 | "data": { 1136 | "text/plain": [ 1137 | "[5, 6, 0, 1]" 1138 | ] 1139 | }, 1140 | "execution_count": 68, 1141 | "metadata": {}, 1142 | "output_type": "execute_result" 1143 | } 1144 | ], 1145 | "source": [ 1146 | "set1[-4:]" 1147 | ] 1148 | }, 1149 | { 1150 | "cell_type": "code", 1151 | "execution_count": 69, 1152 | "metadata": {}, 1153 | "outputs": [ 1154 | { 1155 | "data": { 1156 | "text/plain": [ 1157 | "[6, 3, 5, 6]" 1158 | ] 1159 | }, 1160 | "execution_count": 69, 1161 | "metadata": {}, 1162 | "output_type": "execute_result" 1163 | } 1164 | ], 1165 | "source": [ 1166 | "set1[-6:-2]" 1167 | ] 1168 | }, 1169 | { 1170 | "cell_type": "code", 1171 | "execution_count": 157, 1172 | "metadata": {}, 1173 | "outputs": [ 1174 | { 1175 | "data": { 1176 | "text/plain": [ 1177 | "['foo', 'bar', 'baz']" 1178 | ] 1179 | }, 1180 | "execution_count": 157, 1181 | "metadata": {}, 1182 | "output_type": "execute_result" 1183 | } 1184 | ], 1185 | "source": [ 1186 | "set1" 1187 | ] 1188 | }, 1189 | { 1190 | "cell_type": "code", 1191 | "execution_count": null, 1192 | "metadata": {}, 1193 | "outputs": [], 1194 | "source": [] 1195 | }, 1196 | { 1197 | "cell_type": "code", 1198 | "execution_count": 147, 1199 | "metadata": {}, 1200 | "outputs": [ 1201 | { 1202 | "data": { 1203 | "text/plain": [ 1204 | "[7, 3, 5, 0]" 1205 | ] 1206 | }, 1207 | "execution_count": 147, 1208 | "metadata": {}, 1209 | "output_type": "execute_result" 1210 | } 1211 | ], 1212 | "source": [ 1213 | "set1[::2] ## Be careful !! What is happening here?" 1214 | ] 1215 | }, 1216 | { 1217 | "cell_type": "code", 1218 | "execution_count": 71, 1219 | "metadata": {}, 1220 | "outputs": [ 1221 | { 1222 | "data": { 1223 | "text/plain": [ 1224 | "[1, 0, 6, 5, 3, 6, 3, 2, 7]" 1225 | ] 1226 | }, 1227 | "execution_count": 71, 1228 | "metadata": {}, 1229 | "output_type": "execute_result" 1230 | } 1231 | ], 1232 | "source": [ 1233 | "set1[::-1]## such beutiful code! Wow!!" 1234 | ] 1235 | }, 1236 | { 1237 | "cell_type": "markdown", 1238 | "metadata": {}, 1239 | "source": [ 1240 | "### zip" 1241 | ] 1242 | }, 1243 | { 1244 | "cell_type": "code", 1245 | "execution_count": 46, 1246 | "metadata": {}, 1247 | "outputs": [ 1248 | { 1249 | "data": { 1250 | "text/plain": [ 1251 | "[('foo', 'one'), ('bar', 'two'), ('baz', 'three')]" 1252 | ] 1253 | }, 1254 | "execution_count": 46, 1255 | "metadata": {}, 1256 | "output_type": "execute_result" 1257 | } 1258 | ], 1259 | "source": [ 1260 | "set1 = ['foo', 'bar', 'baz']\n", 1261 | "set2 = ['one', 'two', 'three']\n", 1262 | "zipped = zip(set1, set2)\n", 1263 | "list(zipped)" 1264 | ] 1265 | }, 1266 | { 1267 | "cell_type": "code", 1268 | "execution_count": 47, 1269 | "metadata": {}, 1270 | "outputs": [ 1271 | { 1272 | "data": { 1273 | "text/plain": [ 1274 | "" 1275 | ] 1276 | }, 1277 | "execution_count": 47, 1278 | "metadata": {}, 1279 | "output_type": "execute_result" 1280 | } 1281 | ], 1282 | "source": [ 1283 | "zipped" 1284 | ] 1285 | }, 1286 | { 1287 | "cell_type": "markdown", 1288 | "metadata": {}, 1289 | "source": [ 1290 | "#### reversed" 1291 | ] 1292 | }, 1293 | { 1294 | "cell_type": "code", 1295 | "execution_count": 48, 1296 | "metadata": {}, 1297 | "outputs": [ 1298 | { 1299 | "data": { 1300 | "text/plain": [ 1301 | "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]" 1302 | ] 1303 | }, 1304 | "execution_count": 48, 1305 | "metadata": {}, 1306 | "output_type": "execute_result" 1307 | } 1308 | ], 1309 | "source": [ 1310 | "list(range(10))" 1311 | ] 1312 | }, 1313 | { 1314 | "cell_type": "code", 1315 | "execution_count": 74, 1316 | "metadata": {}, 1317 | "outputs": [ 1318 | { 1319 | "data": { 1320 | "text/plain": [ 1321 | "[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]" 1322 | ] 1323 | }, 1324 | "execution_count": 74, 1325 | "metadata": {}, 1326 | "output_type": "execute_result" 1327 | } 1328 | ], 1329 | "source": [ 1330 | "list(reversed(range(10)))" 1331 | ] 1332 | }, 1333 | { 1334 | "cell_type": "markdown", 1335 | "metadata": {}, 1336 | "source": [ 1337 | "### dict" 1338 | ] 1339 | }, 1340 | { 1341 | "cell_type": "code", 1342 | "execution_count": 51, 1343 | "metadata": {}, 1344 | "outputs": [ 1345 | { 1346 | "data": { 1347 | "text/plain": [ 1348 | "{'a': 'some value', 'b': [1, 2, 3, 4], 'c': 999}" 1349 | ] 1350 | }, 1351 | "execution_count": 51, 1352 | "metadata": {}, 1353 | "output_type": "execute_result" 1354 | } 1355 | ], 1356 | "source": [ 1357 | "#empty_dict = {}\n", 1358 | "d1 = {'a' : 'some value', 'b' : [1, 2, 3, 4],'c':999}\n", 1359 | "d1" 1360 | ] 1361 | }, 1362 | { 1363 | "cell_type": "code", 1364 | "execution_count": 52, 1365 | "metadata": {}, 1366 | "outputs": [ 1367 | { 1368 | "data": { 1369 | "text/plain": [ 1370 | "[1, 2, 3, 4]" 1371 | ] 1372 | }, 1373 | "execution_count": 52, 1374 | "metadata": {}, 1375 | "output_type": "execute_result" 1376 | } 1377 | ], 1378 | "source": [ 1379 | "d1['b']" 1380 | ] 1381 | }, 1382 | { 1383 | "cell_type": "code", 1384 | "execution_count": 53, 1385 | "metadata": {}, 1386 | "outputs": [ 1387 | { 1388 | "data": { 1389 | "text/plain": [ 1390 | "'some value'" 1391 | ] 1392 | }, 1393 | "execution_count": 53, 1394 | "metadata": {}, 1395 | "output_type": "execute_result" 1396 | } 1397 | ], 1398 | "source": [ 1399 | "d1['a']" 1400 | ] 1401 | }, 1402 | { 1403 | "cell_type": "code", 1404 | "execution_count": 54, 1405 | "metadata": {}, 1406 | "outputs": [ 1407 | { 1408 | "data": { 1409 | "text/plain": [ 1410 | "{'a': 'some value', 'b': [1, 2, 3, 4], 'c': 999, 7: 'an integer'}" 1411 | ] 1412 | }, 1413 | "execution_count": 54, 1414 | "metadata": {}, 1415 | "output_type": "execute_result" 1416 | } 1417 | ], 1418 | "source": [ 1419 | "d1[7] = 'an integer'\n", 1420 | "d1" 1421 | ] 1422 | }, 1423 | { 1424 | "cell_type": "code", 1425 | "execution_count": 79, 1426 | "metadata": {}, 1427 | "outputs": [ 1428 | { 1429 | "data": { 1430 | "text/plain": [ 1431 | "[1, 2, 3, 4]" 1432 | ] 1433 | }, 1434 | "execution_count": 79, 1435 | "metadata": {}, 1436 | "output_type": "execute_result" 1437 | } 1438 | ], 1439 | "source": [ 1440 | "d1\n", 1441 | "d1['b']" 1442 | ] 1443 | }, 1444 | { 1445 | "cell_type": "code", 1446 | "execution_count": 80, 1447 | "metadata": {}, 1448 | "outputs": [ 1449 | { 1450 | "data": { 1451 | "text/plain": [ 1452 | "True" 1453 | ] 1454 | }, 1455 | "execution_count": 80, 1456 | "metadata": {}, 1457 | "output_type": "execute_result" 1458 | } 1459 | ], 1460 | "source": [ 1461 | "'b' in d1" 1462 | ] 1463 | }, 1464 | { 1465 | "cell_type": "code", 1466 | "execution_count": 81, 1467 | "metadata": {}, 1468 | "outputs": [ 1469 | { 1470 | "data": { 1471 | "text/plain": [ 1472 | "{'a': 'some value', 'b': [1, 2, 3, 4], 7: 'an integer', 5: 'some value'}" 1473 | ] 1474 | }, 1475 | "execution_count": 81, 1476 | "metadata": {}, 1477 | "output_type": "execute_result" 1478 | } 1479 | ], 1480 | "source": [ 1481 | "d1[5] = 'some value'\n", 1482 | "d1" 1483 | ] 1484 | }, 1485 | { 1486 | "cell_type": "code", 1487 | "execution_count": 55, 1488 | "metadata": {}, 1489 | "outputs": [ 1490 | { 1491 | "data": { 1492 | "text/plain": [ 1493 | "{'a': 'some value',\n", 1494 | " 'b': [1, 2, 3, 4],\n", 1495 | " 'c': 999,\n", 1496 | " 7: 'an integer',\n", 1497 | " 'dummy': 'another value'}" 1498 | ] 1499 | }, 1500 | "execution_count": 55, 1501 | "metadata": {}, 1502 | "output_type": "execute_result" 1503 | } 1504 | ], 1505 | "source": [ 1506 | "d1['dummy'] = 'another value'\n", 1507 | "d1" 1508 | ] 1509 | }, 1510 | { 1511 | "cell_type": "code", 1512 | "execution_count": 56, 1513 | "metadata": {}, 1514 | "outputs": [ 1515 | { 1516 | "data": { 1517 | "text/plain": [ 1518 | "{'a': 'some value', 'b': [1, 2, 3, 4], 'c': 999, 'dummy': 'another value'}" 1519 | ] 1520 | }, 1521 | "execution_count": 56, 1522 | "metadata": {}, 1523 | "output_type": "execute_result" 1524 | } 1525 | ], 1526 | "source": [ 1527 | "del d1[7]\n", 1528 | "d1" 1529 | ] 1530 | }, 1531 | { 1532 | "cell_type": "code", 1533 | "execution_count": 57, 1534 | "metadata": {}, 1535 | "outputs": [ 1536 | { 1537 | "data": { 1538 | "text/plain": [ 1539 | "'another value'" 1540 | ] 1541 | }, 1542 | "execution_count": 57, 1543 | "metadata": {}, 1544 | "output_type": "execute_result" 1545 | } 1546 | ], 1547 | "source": [ 1548 | "ret = d1.pop('dummy')\n", 1549 | "ret ## It gives the member which is removed\n", 1550 | "#d1" 1551 | ] 1552 | }, 1553 | { 1554 | "cell_type": "code", 1555 | "execution_count": 58, 1556 | "metadata": {}, 1557 | "outputs": [ 1558 | { 1559 | "data": { 1560 | "text/plain": [ 1561 | "{'a': 'some value', 'b': [1, 2, 3, 4], 'c': 999}" 1562 | ] 1563 | }, 1564 | "execution_count": 58, 1565 | "metadata": {}, 1566 | "output_type": "execute_result" 1567 | } 1568 | ], 1569 | "source": [ 1570 | "d1" 1571 | ] 1572 | }, 1573 | { 1574 | "cell_type": "code", 1575 | "execution_count": 154, 1576 | "metadata": {}, 1577 | "outputs": [ 1578 | { 1579 | "data": { 1580 | "text/plain": [ 1581 | "'another value'" 1582 | ] 1583 | }, 1584 | "execution_count": 154, 1585 | "metadata": {}, 1586 | "output_type": "execute_result" 1587 | } 1588 | ], 1589 | "source": [ 1590 | "ret" 1591 | ] 1592 | }, 1593 | { 1594 | "cell_type": "code", 1595 | "execution_count": 59, 1596 | "metadata": {}, 1597 | "outputs": [ 1598 | { 1599 | "data": { 1600 | "text/plain": [ 1601 | "dict_keys(['a', 'b', 'c'])" 1602 | ] 1603 | }, 1604 | "execution_count": 59, 1605 | "metadata": {}, 1606 | "output_type": "execute_result" 1607 | } 1608 | ], 1609 | "source": [ 1610 | "d1.keys()" 1611 | ] 1612 | }, 1613 | { 1614 | "cell_type": "code", 1615 | "execution_count": 60, 1616 | "metadata": {}, 1617 | "outputs": [ 1618 | { 1619 | "data": { 1620 | "text/plain": [ 1621 | "dict_values(['some value', [1, 2, 3, 4], 999])" 1622 | ] 1623 | }, 1624 | "execution_count": 60, 1625 | "metadata": {}, 1626 | "output_type": "execute_result" 1627 | } 1628 | ], 1629 | "source": [ 1630 | "d1.values()" 1631 | ] 1632 | }, 1633 | { 1634 | "cell_type": "code", 1635 | "execution_count": 61, 1636 | "metadata": {}, 1637 | "outputs": [ 1638 | { 1639 | "data": { 1640 | "text/plain": [ 1641 | "['a', 'b', 'c']" 1642 | ] 1643 | }, 1644 | "execution_count": 61, 1645 | "metadata": {}, 1646 | "output_type": "execute_result" 1647 | } 1648 | ], 1649 | "source": [ 1650 | "list(d1.keys())\n" 1651 | ] 1652 | }, 1653 | { 1654 | "cell_type": "code", 1655 | "execution_count": 62, 1656 | "metadata": {}, 1657 | "outputs": [ 1658 | { 1659 | "data": { 1660 | "text/plain": [ 1661 | "['some value', [1, 2, 3, 4], 999]" 1662 | ] 1663 | }, 1664 | "execution_count": 62, 1665 | "metadata": {}, 1666 | "output_type": "execute_result" 1667 | } 1668 | ], 1669 | "source": [ 1670 | "list(d1.values())" 1671 | ] 1672 | }, 1673 | { 1674 | "cell_type": "markdown", 1675 | "metadata": {}, 1676 | "source": [ 1677 | "#### Anonymous (Lambda) Functions\n", 1678 | "\n", 1679 | "def sqr(x): \n", 1680 | "return x ** 2\n", 1681 | " \n", 1682 | "##### sqr = lambda x: x **2\n" 1683 | ] 1684 | }, 1685 | { 1686 | "cell_type": "code", 1687 | "execution_count": 1, 1688 | "metadata": {}, 1689 | "outputs": [], 1690 | "source": [ 1691 | "f=lambda x:x**2" 1692 | ] 1693 | }, 1694 | { 1695 | "cell_type": "code", 1696 | "execution_count": 2, 1697 | "metadata": {}, 1698 | "outputs": [ 1699 | { 1700 | "data": { 1701 | "text/plain": [ 1702 | "81" 1703 | ] 1704 | }, 1705 | "execution_count": 2, 1706 | "metadata": {}, 1707 | "output_type": "execute_result" 1708 | } 1709 | ], 1710 | "source": [ 1711 | "f(9)" 1712 | ] 1713 | }, 1714 | { 1715 | "cell_type": "markdown", 1716 | "metadata": {}, 1717 | "source": [ 1718 | "#### Thanks! This much for this module. \n", 1719 | "#### Don't forget to follow me for more such stuff.\n", 1720 | "* https://www.linkedin.com/in/ramendra-kumar-57334478/\n", 1721 | "* https://github.com/Rami-RK\n", 1722 | "\n", 1723 | "#### Feel free to share." 1724 | ] 1725 | } 1726 | ], 1727 | "metadata": { 1728 | "kernelspec": { 1729 | "display_name": "Python 3", 1730 | "language": "python", 1731 | "name": "python3" 1732 | }, 1733 | "language_info": { 1734 | "codemirror_mode": { 1735 | "name": "ipython", 1736 | "version": 3 1737 | }, 1738 | "file_extension": ".py", 1739 | "mimetype": "text/x-python", 1740 | "name": "python", 1741 | "nbconvert_exporter": "python", 1742 | "pygments_lexer": "ipython3", 1743 | "version": "3.7.1" 1744 | } 1745 | }, 1746 | "nbformat": 4, 1747 | "nbformat_minor": 2 1748 | } 1749 | -------------------------------------------------------------------------------- /macrodata.csv: -------------------------------------------------------------------------------- 1 | year,quarter,realgdp,realcons,realinv,realgovt,realdpi,cpi,m1,tbilrate,unemp,pop,infl,realint 2 | 1959.0,1.0,2710.349,1707.4,286.898,470.045,1886.9,28.98,139.7,2.82,5.8,177.146,0.0,0.0 3 | 1959.0,2.0,2778.801,1733.7,310.859,481.301,1919.7,29.15,141.7,3.08,5.1,177.83,2.34,0.74 4 | 1959.0,3.0,2775.488,1751.8,289.226,491.26,1916.4,29.35,140.5,3.82,5.3,178.657,2.74,1.09 5 | 1959.0,4.0,2785.204,1753.7,299.356,484.052,1931.3,29.37,140.0,4.33,5.6,179.386,0.27,4.06 6 | 1960.0,1.0,2847.699,1770.5,331.722,462.199,1955.5,29.54,139.6,3.5,5.2,180.007,2.31,1.19 7 | 1960.0,2.0,2834.39,1792.9,298.152,460.4,1966.1,29.55,140.2,2.68,5.2,180.671,0.14,2.55 8 | 1960.0,3.0,2839.022,1785.8,296.375,474.676,1967.8,29.75,140.9,2.36,5.6,181.528,2.7,-0.34 9 | 1960.0,4.0,2802.616,1788.2,259.764,476.434,1966.6,29.84,141.1,2.29,6.3,182.287,1.21,1.08 10 | 1961.0,1.0,2819.264,1787.7,266.405,475.854,1984.5,29.81,142.1,2.37,6.8,182.992,-0.4,2.77 11 | 1961.0,2.0,2872.005,1814.3,286.246,480.328,2014.4,29.92,142.9,2.29,7.0,183.691,1.47,0.81 12 | 1961.0,3.0,2918.419,1823.1,310.227,493.828,2041.9,29.98,144.1,2.32,6.8,184.524,0.8,1.52 13 | 1961.0,4.0,2977.83,1859.6,315.463,502.521,2082.0,30.04,145.2,2.6,6.2,185.242,0.8,1.8 14 | 1962.0,1.0,3031.241,1879.4,334.271,520.96,2101.7,30.21,146.4,2.73,5.6,185.874,2.26,0.47 15 | 1962.0,2.0,3064.709,1902.5,331.039,523.066,2125.2,30.22,146.5,2.78,5.5,186.538,0.13,2.65 16 | 1962.0,3.0,3093.047,1917.9,336.962,538.838,2137.0,30.38,146.7,2.78,5.6,187.323,2.11,0.67 17 | 1962.0,4.0,3100.563,1945.1,325.65,535.912,2154.6,30.44,148.3,2.87,5.5,188.013,0.79,2.08 18 | 1963.0,1.0,3141.087,1958.2,343.721,522.917,2172.5,30.48,149.7,2.9,5.8,188.58,0.53,2.38 19 | 1963.0,2.0,3180.447,1976.9,348.73,518.108,2193.1,30.69,151.3,3.03,5.7,189.242,2.75,0.29 20 | 1963.0,3.0,3240.332,2003.8,360.102,546.893,2217.9,30.75,152.6,3.38,5.5,190.028,0.78,2.6 21 | 1963.0,4.0,3264.967,2020.6,364.534,532.383,2254.6,30.94,153.7,3.52,5.6,190.668,2.46,1.06 22 | 1964.0,1.0,3338.246,2060.5,379.523,529.686,2299.6,30.95,154.8,3.51,5.5,191.245,0.13,3.38 23 | 1964.0,2.0,3376.587,2096.7,377.778,526.175,2362.1,31.02,156.8,3.47,5.2,191.889,0.9,2.57 24 | 1964.0,3.0,3422.469,2135.2,386.754,522.008,2392.7,31.12,159.2,3.53,5.0,192.631,1.29,2.25 25 | 1964.0,4.0,3431.957,2141.2,389.91,514.603,2420.4,31.28,160.7,3.76,5.0,193.223,2.05,1.71 26 | 1965.0,1.0,3516.251,2188.8,429.145,508.006,2447.4,31.38,162.0,3.93,4.9,193.709,1.28,2.65 27 | 1965.0,2.0,3563.96,2213.0,429.119,508.931,2474.5,31.58,163.1,3.84,4.7,194.303,2.54,1.3 28 | 1965.0,3.0,3636.285,2251.0,444.444,529.446,2542.6,31.65,166.0,3.93,4.4,194.997,0.89,3.04 29 | 1965.0,4.0,3724.014,2314.3,446.493,544.121,2594.1,31.88,169.1,4.35,4.1,195.539,2.9,1.46 30 | 1966.0,1.0,3815.423,2348.5,484.244,556.593,2618.4,32.28,171.8,4.62,3.9,195.999,4.99,-0.37 31 | 1966.0,2.0,3828.124,2354.5,475.408,571.371,2624.7,32.45,170.3,4.65,3.8,196.56,2.1,2.55 32 | 1966.0,3.0,3853.301,2381.5,470.697,594.514,2657.8,32.85,171.2,5.23,3.8,197.207,4.9,0.33 33 | 1966.0,4.0,3884.52,2391.4,472.957,599.528,2688.2,32.9,171.9,5.0,3.7,197.736,0.61,4.39 34 | 1967.0,1.0,3918.74,2405.3,460.007,640.682,2728.4,33.1,174.2,4.22,3.8,198.206,2.42,1.8 35 | 1967.0,2.0,3919.556,2438.1,440.393,631.43,2750.8,33.4,178.1,3.78,3.8,198.712,3.61,0.17 36 | 1967.0,3.0,3950.826,2450.6,453.033,641.504,2777.1,33.7,181.6,4.42,3.8,199.311,3.58,0.84 37 | 1967.0,4.0,3980.97,2465.7,462.834,640.234,2797.4,34.1,184.3,4.9,3.9,199.808,4.72,0.18 38 | 1968.0,1.0,4063.013,2524.6,472.907,651.378,2846.2,34.4,186.6,5.18,3.7,200.208,3.5,1.67 39 | 1968.0,2.0,4131.998,2563.3,492.026,646.145,2893.5,34.9,190.5,5.5,3.5,200.706,5.77,-0.28 40 | 1968.0,3.0,4160.267,2611.5,476.053,640.615,2899.3,35.3,194.0,5.21,3.5,201.29,4.56,0.65 41 | 1968.0,4.0,4178.293,2623.5,480.998,636.729,2918.4,35.7,198.7,5.85,3.4,201.76,4.51,1.34 42 | 1969.0,1.0,4244.1,2652.9,512.686,633.224,2923.4,36.3,200.7,6.08,3.4,202.161,6.67,-0.58 43 | 1969.0,2.0,4256.46,2669.8,508.601,623.16,2952.9,36.8,201.7,6.49,3.4,202.677,5.47,1.02 44 | 1969.0,3.0,4283.378,2682.7,520.36,623.613,3012.9,37.3,202.9,7.02,3.6,203.302,5.4,1.63 45 | 1969.0,4.0,4263.261,2704.1,492.334,606.9,3034.9,37.9,206.2,7.64,3.6,203.849,6.38,1.26 46 | 1970.0,1.0,4256.573,2720.7,476.925,594.888,3050.1,38.5,206.7,6.76,4.2,204.401,6.28,0.47 47 | 1970.0,2.0,4264.289,2733.2,478.419,576.257,3103.5,38.9,208.0,6.66,4.8,205.052,4.13,2.52 48 | 1970.0,3.0,4302.259,2757.1,486.594,567.743,3145.4,39.4,212.9,6.15,5.2,205.788,5.11,1.04 49 | 1970.0,4.0,4256.637,2749.6,458.406,564.666,3135.1,39.9,215.5,4.86,5.8,206.466,5.04,-0.18 50 | 1971.0,1.0,4374.016,2802.2,517.935,542.709,3197.3,40.1,220.0,3.65,5.9,207.065,2.0,1.65 51 | 1971.0,2.0,4398.829,2827.9,533.986,534.905,3245.3,40.6,224.9,4.76,5.9,207.661,4.96,-0.19 52 | 1971.0,3.0,4433.943,2850.4,541.01,532.646,3259.7,40.9,227.2,4.7,6.0,208.345,2.94,1.75 53 | 1971.0,4.0,4446.264,2897.8,524.085,516.14,3294.2,41.2,230.1,3.87,6.0,208.917,2.92,0.95 54 | 1972.0,1.0,4525.769,2936.5,561.147,518.192,3314.9,41.5,235.6,3.55,5.8,209.386,2.9,0.64 55 | 1972.0,2.0,4633.101,2992.6,595.495,526.473,3346.1,41.8,238.8,3.86,5.7,209.896,2.88,0.98 56 | 1972.0,3.0,4677.503,3038.8,603.97,498.116,3414.6,42.2,245.0,4.47,5.6,210.479,3.81,0.66 57 | 1972.0,4.0,4754.546,3110.1,607.104,496.54,3550.5,42.7,251.5,5.09,5.3,210.985,4.71,0.38 58 | 1973.0,1.0,4876.166,3167.0,645.654,504.838,3590.7,43.7,252.7,5.98,5.0,211.42,9.26,-3.28 59 | 1973.0,2.0,4932.571,3165.4,675.837,497.033,3626.2,44.2,257.5,7.19,4.9,211.909,4.55,2.64 60 | 1973.0,3.0,4906.252,3176.7,649.412,475.897,3644.4,45.6,259.0,8.06,4.8,212.475,12.47,-4.41 61 | 1973.0,4.0,4953.05,3167.4,674.253,476.174,3688.9,46.8,263.8,7.68,4.8,212.932,10.39,-2.71 62 | 1974.0,1.0,4909.617,3139.7,631.23,491.043,3632.3,48.1,267.2,7.8,5.1,213.361,10.96,-3.16 63 | 1974.0,2.0,4922.188,3150.6,628.102,490.177,3601.1,49.3,269.3,7.89,5.2,213.854,9.86,-1.96 64 | 1974.0,3.0,4873.52,3163.6,592.672,492.586,3612.4,51.0,272.3,8.16,5.6,214.451,13.56,-5.4 65 | 1974.0,4.0,4854.34,3117.3,598.306,496.176,3596.0,52.3,273.9,6.96,6.6,214.931,10.07,-3.11 66 | 1975.0,1.0,4795.295,3143.4,493.212,490.603,3581.9,53.0,276.2,5.53,8.2,215.353,5.32,0.22 67 | 1975.0,2.0,4831.942,3195.8,476.085,486.679,3749.3,54.0,283.7,5.57,8.9,215.973,7.48,-1.91 68 | 1975.0,3.0,4913.328,3241.4,516.402,498.836,3698.6,54.9,285.4,6.27,8.5,216.587,6.61,-0.34 69 | 1975.0,4.0,4977.511,3275.7,530.596,500.141,3736.0,55.8,288.4,5.26,8.3,217.095,6.5,-1.24 70 | 1976.0,1.0,5090.663,3341.2,585.541,495.568,3791.0,56.1,294.7,4.91,7.7,217.528,2.14,2.77 71 | 1976.0,2.0,5128.947,3371.8,610.513,494.532,3822.2,57.0,297.2,5.28,7.6,218.035,6.37,-1.09 72 | 1976.0,3.0,5154.072,3407.5,611.646,493.141,3856.7,57.9,302.0,5.05,7.7,218.644,6.27,-1.22 73 | 1976.0,4.0,5191.499,3451.8,615.898,494.415,3884.4,58.7,308.3,4.57,7.8,219.179,5.49,-0.92 74 | 1977.0,1.0,5251.762,3491.3,646.198,498.509,3887.5,60.0,316.0,4.6,7.5,219.684,8.76,-4.16 75 | 1977.0,2.0,5356.131,3510.6,696.141,506.695,3931.8,60.8,320.2,5.06,7.1,220.239,5.3,-0.24 76 | 1977.0,3.0,5451.921,3544.1,734.078,509.605,3990.8,61.6,326.4,5.82,6.9,220.904,5.23,0.59 77 | 1977.0,4.0,5450.793,3597.5,713.356,504.584,4071.2,62.7,334.4,6.2,6.6,221.477,7.08,-0.88 78 | 1978.0,1.0,5469.405,3618.5,727.504,506.314,4096.4,63.9,339.9,6.34,6.3,221.991,7.58,-1.24 79 | 1978.0,2.0,5684.569,3695.9,777.454,518.366,4143.4,65.5,347.6,6.72,6.0,222.585,9.89,-3.18 80 | 1978.0,3.0,5740.3,3711.4,801.452,520.199,4177.1,67.1,353.3,7.64,6.0,223.271,9.65,-2.01 81 | 1978.0,4.0,5816.222,3741.3,819.689,524.782,4209.8,68.5,358.6,9.02,5.9,223.865,8.26,0.76 82 | 1979.0,1.0,5825.949,3760.2,819.556,525.524,4255.9,70.6,368.0,9.42,5.9,224.438,12.08,-2.66 83 | 1979.0,2.0,5831.418,3758.0,817.66,532.04,4226.1,73.0,377.2,9.3,5.7,225.055,13.37,-4.07 84 | 1979.0,3.0,5873.335,3794.9,801.742,531.232,4250.3,75.2,380.8,10.49,5.9,225.801,11.88,-1.38 85 | 1979.0,4.0,5889.495,3805.0,786.817,531.126,4284.3,78.0,385.8,11.94,5.9,226.451,14.62,-2.68 86 | 1980.0,1.0,5908.467,3798.4,781.114,548.115,4296.2,80.9,383.8,13.75,6.3,227.061,14.6,-0.85 87 | 1980.0,2.0,5787.373,3712.2,710.64,561.895,4236.1,82.6,394.0,7.9,7.3,227.726,8.32,-0.42 88 | 1980.0,3.0,5776.617,3752.0,656.477,554.292,4279.7,84.7,409.0,10.34,7.7,228.417,10.04,0.3 89 | 1980.0,4.0,5883.46,3802.0,723.22,556.13,4368.1,87.2,411.3,14.75,7.4,228.937,11.64,3.11 90 | 1981.0,1.0,6005.717,3822.8,795.091,567.618,4358.1,89.1,427.4,13.95,7.4,229.403,8.62,5.32 91 | 1981.0,2.0,5957.795,3822.8,757.24,584.54,4358.6,91.5,426.9,15.33,7.4,229.966,10.63,4.69 92 | 1981.0,3.0,6030.184,3838.3,804.242,583.89,4455.4,93.4,428.4,14.58,7.4,230.641,8.22,6.36 93 | 1981.0,4.0,5955.062,3809.3,773.053,590.125,4464.4,94.4,442.7,11.33,8.2,231.157,4.26,7.07 94 | 1982.0,1.0,5857.333,3833.9,692.514,591.043,4469.6,95.0,447.1,12.95,8.8,231.645,2.53,10.42 95 | 1982.0,2.0,5889.074,3847.7,691.9,596.403,4500.8,97.5,448.0,11.97,9.4,232.188,10.39,1.58 96 | 1982.0,3.0,5866.37,3877.2,683.825,605.37,4520.6,98.1,464.5,8.1,9.9,232.816,2.45,5.65 97 | 1982.0,4.0,5871.001,3947.9,622.93,623.307,4536.4,97.9,477.2,7.96,10.7,233.322,-0.82,8.77 98 | 1983.0,1.0,5944.02,3986.6,645.11,630.873,4572.2,98.8,493.2,8.22,10.4,233.781,3.66,4.56 99 | 1983.0,2.0,6077.619,4065.7,707.372,644.322,4605.5,99.8,507.8,8.69,10.1,234.307,4.03,4.66 100 | 1983.0,3.0,6197.468,4137.6,754.937,662.412,4674.7,100.8,517.2,8.99,9.4,234.907,3.99,5.01 101 | 1983.0,4.0,6325.574,4203.2,834.427,639.197,4771.1,102.1,525.1,8.89,8.5,235.385,5.13,3.76 102 | 1984.0,1.0,6448.264,4239.2,921.763,644.635,4875.4,103.3,535.0,9.43,7.9,235.839,4.67,4.76 103 | 1984.0,2.0,6559.594,4299.9,952.841,664.839,4959.4,104.1,540.9,9.94,7.5,236.348,3.09,6.85 104 | 1984.0,3.0,6623.343,4333.0,974.989,662.294,5036.6,105.1,543.7,10.19,7.4,236.976,3.82,6.37 105 | 1984.0,4.0,6677.264,4390.1,958.993,684.282,5084.5,105.7,557.0,8.14,7.3,237.468,2.28,5.87 106 | 1985.0,1.0,6740.275,4464.6,927.375,691.613,5072.0,107.0,570.4,8.25,7.3,237.9,4.89,3.36 107 | 1985.0,2.0,6797.344,4505.2,943.383,708.524,5172.7,107.7,589.1,7.17,7.3,238.466,2.61,4.56 108 | 1985.0,3.0,6903.523,4590.8,932.959,732.305,5140.7,108.5,607.8,7.13,7.2,239.113,2.96,4.17 109 | 1985.0,4.0,6955.918,4600.9,969.434,732.026,5193.9,109.9,621.4,7.14,7.0,239.638,5.13,2.01 110 | 1986.0,1.0,7022.757,4639.3,967.442,728.125,5255.8,108.7,641.0,6.56,7.0,240.094,-4.39,10.95 111 | 1986.0,2.0,7050.969,4688.7,945.972,751.334,5315.5,109.5,670.3,6.06,7.2,240.651,2.93,3.13 112 | 1986.0,3.0,7118.95,4770.7,916.315,779.77,5343.3,110.2,694.9,5.31,7.0,241.274,2.55,2.76 113 | 1986.0,4.0,7153.359,4799.4,917.736,767.671,5346.5,111.4,730.2,5.44,6.8,241.784,4.33,1.1 114 | 1987.0,1.0,7193.019,4792.1,945.776,772.247,5379.4,112.7,743.9,5.61,6.6,242.252,4.64,0.97 115 | 1987.0,2.0,7269.51,4856.3,947.1,782.962,5321.0,113.8,743.0,5.67,6.3,242.804,3.89,1.79 116 | 1987.0,3.0,7332.558,4910.4,948.055,783.804,5416.2,115.0,756.2,6.19,6.0,243.446,4.2,1.99 117 | 1987.0,4.0,7458.022,4922.2,1021.98,795.467,5493.1,116.0,756.2,5.76,5.9,243.981,3.46,2.29 118 | 1988.0,1.0,7496.6,5004.4,964.398,773.851,5562.1,117.2,768.1,5.76,5.7,244.445,4.12,1.64 119 | 1988.0,2.0,7592.881,5040.8,987.858,765.98,5614.3,118.5,781.4,6.48,5.5,245.021,4.41,2.07 120 | 1988.0,3.0,7632.082,5080.6,994.204,760.245,5657.5,119.9,783.3,7.22,5.5,245.693,4.7,2.52 121 | 1988.0,4.0,7733.991,5140.4,1007.371,783.065,5708.5,121.2,785.7,8.03,5.3,246.224,4.31,3.72 122 | 1989.0,1.0,7806.603,5159.3,1045.975,767.024,5773.4,123.1,779.2,8.67,5.2,246.721,6.22,2.44 123 | 1989.0,2.0,7865.016,5182.4,1033.753,784.275,5749.8,124.5,777.8,8.15,5.2,247.342,4.52,3.63 124 | 1989.0,3.0,7927.393,5236.1,1021.604,791.819,5787.0,125.4,786.6,7.76,5.3,248.067,2.88,4.88 125 | 1989.0,4.0,7944.697,5261.7,1011.119,787.844,5831.3,127.5,795.4,7.65,5.4,248.659,6.64,1.01 126 | 1990.0,1.0,8027.693,5303.3,1021.07,799.681,5875.1,128.9,806.2,7.8,5.3,249.306,4.37,3.44 127 | 1990.0,2.0,8059.598,5320.8,1021.36,800.639,5913.9,130.5,810.1,7.7,5.3,250.132,4.93,2.76 128 | 1990.0,3.0,8059.476,5341.0,997.319,793.513,5918.1,133.4,819.8,7.33,5.7,251.057,8.79,-1.46 129 | 1990.0,4.0,7988.864,5299.5,934.248,800.525,5878.2,134.7,827.2,6.67,6.1,251.889,3.88,2.79 130 | 1991.0,1.0,7950.164,5284.4,896.21,806.775,5896.3,135.1,843.2,5.83,6.6,252.643,1.19,4.65 131 | 1991.0,2.0,8003.822,5324.7,891.704,809.081,5941.1,136.2,861.5,5.54,6.8,253.493,3.24,2.29 132 | 1991.0,3.0,8037.538,5345.0,913.904,793.987,5953.6,137.2,878.0,5.18,6.9,254.435,2.93,2.25 133 | 1991.0,4.0,8069.046,5342.6,948.891,778.378,5992.4,138.3,910.4,4.14,7.1,255.214,3.19,0.95 134 | 1992.0,1.0,8157.616,5434.5,927.796,778.568,6082.9,139.4,943.8,3.88,7.4,255.992,3.17,0.71 135 | 1992.0,2.0,8244.294,5466.7,988.912,777.762,6129.5,140.5,963.2,3.5,7.6,256.894,3.14,0.36 136 | 1992.0,3.0,8329.361,5527.1,999.135,786.639,6160.6,141.7,1003.8,2.97,7.6,257.861,3.4,-0.44 137 | 1992.0,4.0,8417.016,5594.6,1030.758,787.064,6248.2,142.8,1030.4,3.12,7.4,258.679,3.09,0.02 138 | 1993.0,1.0,8432.485,5617.2,1054.979,762.901,6156.5,143.8,1047.6,2.92,7.2,259.414,2.79,0.13 139 | 1993.0,2.0,8486.435,5671.1,1063.263,752.158,6252.3,144.5,1084.5,3.02,7.1,260.255,1.94,1.08 140 | 1993.0,3.0,8531.108,5732.7,1062.514,744.227,6265.7,145.6,1113.0,3.0,6.8,261.163,3.03,-0.04 141 | 1993.0,4.0,8643.769,5783.7,1118.583,748.102,6358.1,146.3,1131.6,3.05,6.6,261.919,1.92,1.13 142 | 1994.0,1.0,8727.919,5848.1,1166.845,721.288,6332.6,147.2,1141.1,3.48,6.6,262.631,2.45,1.02 143 | 1994.0,2.0,8847.303,5891.5,1234.855,717.197,6440.6,148.4,1150.5,4.2,6.2,263.436,3.25,0.96 144 | 1994.0,3.0,8904.289,5938.7,1212.655,736.89,6487.9,149.4,1150.1,4.68,6.0,264.301,2.69,2.0 145 | 1994.0,4.0,9003.18,5997.3,1269.19,716.702,6574.0,150.5,1151.4,5.53,5.6,265.044,2.93,2.6 146 | 1995.0,1.0,9025.267,6004.3,1282.09,715.326,6616.6,151.8,1149.3,5.72,5.5,265.755,3.44,2.28 147 | 1995.0,2.0,9044.668,6053.5,1247.61,712.492,6617.2,152.6,1145.4,5.52,5.7,266.557,2.1,3.42 148 | 1995.0,3.0,9120.684,6107.6,1235.601,707.649,6666.8,153.5,1137.3,5.32,5.7,267.456,2.35,2.97 149 | 1995.0,4.0,9184.275,6150.6,1270.392,681.081,6706.2,154.7,1123.5,5.17,5.6,268.151,3.11,2.05 150 | 1996.0,1.0,9247.188,6206.9,1287.128,695.265,6777.7,156.1,1124.8,4.91,5.5,268.853,3.6,1.31 151 | 1996.0,2.0,9407.052,6277.1,1353.795,705.172,6850.6,157.0,1112.4,5.09,5.5,269.667,2.3,2.79 152 | 1996.0,3.0,9488.879,6314.6,1422.059,692.741,6908.9,158.2,1086.1,5.04,5.3,270.581,3.05,2.0 153 | 1996.0,4.0,9592.458,6366.1,1418.193,690.744,6946.8,159.4,1081.5,4.99,5.3,271.36,3.02,1.97 154 | 1997.0,1.0,9666.235,6430.2,1451.304,681.445,7008.9,159.9,1063.8,5.1,5.2,272.083,1.25,3.85 155 | 1997.0,2.0,9809.551,6456.2,1543.976,693.525,7061.5,160.4,1066.2,5.01,5.0,272.912,1.25,3.76 156 | 1997.0,3.0,9932.672,6566.0,1571.426,691.261,7142.4,161.5,1065.5,5.02,4.9,273.852,2.73,2.29 157 | 1997.0,4.0,10008.874,6641.1,1596.523,690.311,7241.5,162.0,1074.4,5.11,4.7,274.626,1.24,3.88 158 | 1998.0,1.0,10103.425,6707.2,1672.732,668.783,7406.2,162.2,1076.1,5.02,4.6,275.304,0.49,4.53 159 | 1998.0,2.0,10194.277,6822.6,1652.716,687.184,7512.0,163.2,1075.0,4.98,4.4,276.115,2.46,2.52 160 | 1998.0,3.0,10328.787,6913.1,1700.071,681.472,7591.0,163.9,1086.0,4.49,4.5,277.003,1.71,2.78 161 | 1998.0,4.0,10507.575,7019.1,1754.743,688.147,7646.5,164.7,1097.8,4.38,4.4,277.79,1.95,2.43 162 | 1999.0,1.0,10601.179,7088.3,1809.993,683.601,7698.4,165.9,1101.9,4.39,4.3,278.451,2.9,1.49 163 | 1999.0,2.0,10684.049,7199.9,1803.674,683.594,7716.0,166.7,1098.7,4.54,4.3,279.295,1.92,2.62 164 | 1999.0,3.0,10819.914,7286.4,1848.949,697.936,7765.9,168.1,1102.3,4.75,4.2,280.203,3.35,1.41 165 | 1999.0,4.0,11014.254,7389.2,1914.567,713.445,7887.7,169.3,1121.9,5.2,4.1,280.976,2.85,2.35 166 | 2000.0,1.0,11043.044,7501.3,1887.836,685.216,8053.4,170.9,1113.5,5.63,4.0,281.653,3.76,1.87 167 | 2000.0,2.0,11258.454,7571.8,2018.529,712.641,8135.9,172.7,1103.0,5.81,3.9,282.385,4.19,1.62 168 | 2000.0,3.0,11267.867,7645.9,1986.956,698.827,8222.3,173.9,1098.7,6.07,4.0,283.19,2.77,3.3 169 | 2000.0,4.0,11334.544,7713.5,1987.845,695.597,8234.6,175.6,1097.7,5.7,3.9,283.9,3.89,1.81 170 | 2001.0,1.0,11297.171,7744.3,1882.691,710.403,8296.5,176.4,1114.9,4.39,4.2,284.55,1.82,2.57 171 | 2001.0,2.0,11371.251,7773.5,1876.65,725.623,8273.7,177.4,1139.7,3.54,4.4,285.267,2.26,1.28 172 | 2001.0,3.0,11340.075,7807.7,1837.074,730.493,8484.5,177.6,1166.0,2.72,4.8,286.047,0.45,2.27 173 | 2001.0,4.0,11380.128,7930.0,1731.189,739.318,8385.5,177.7,1190.9,1.74,5.5,286.728,0.23,1.51 174 | 2002.0,1.0,11477.868,7957.3,1789.327,756.915,8611.6,179.3,1185.9,1.75,5.7,287.328,3.59,-1.84 175 | 2002.0,2.0,11538.77,7997.8,1810.779,774.408,8658.9,180.0,1199.5,1.7,5.8,288.028,1.56,0.14 176 | 2002.0,3.0,11596.43,8052.0,1814.531,786.673,8629.2,181.2,1204.0,1.61,5.7,288.783,2.66,-1.05 177 | 2002.0,4.0,11598.824,8080.6,1813.219,799.967,8649.6,182.6,1226.8,1.2,5.8,289.421,3.08,-1.88 178 | 2003.0,1.0,11645.819,8122.3,1813.141,800.196,8681.3,183.2,1248.4,1.14,5.9,290.019,1.31,-0.17 179 | 2003.0,2.0,11738.706,8197.8,1823.698,838.775,8812.5,183.7,1287.9,0.96,6.2,290.704,1.09,-0.13 180 | 2003.0,3.0,11935.461,8312.1,1889.883,839.598,8935.4,184.9,1297.3,0.94,6.1,291.449,2.6,-1.67 181 | 2003.0,4.0,12042.817,8358.0,1959.783,845.722,8986.4,186.3,1306.1,0.9,5.8,292.057,3.02,-2.11 182 | 2004.0,1.0,12127.623,8437.6,1970.015,856.57,9025.9,187.4,1332.1,0.94,5.7,292.635,2.35,-1.42 183 | 2004.0,2.0,12213.818,8483.2,2055.58,861.44,9115.0,189.1,1340.5,1.21,5.6,293.31,3.61,-2.41 184 | 2004.0,3.0,12303.533,8555.8,2082.231,876.385,9175.9,190.8,1361.0,1.63,5.4,294.066,3.58,-1.95 185 | 2004.0,4.0,12410.282,8654.2,2125.152,865.596,9303.4,191.8,1366.6,2.2,5.4,294.741,2.09,0.11 186 | 2005.0,1.0,12534.113,8719.0,2170.299,869.204,9189.6,193.8,1357.8,2.69,5.3,295.308,4.15,-1.46 187 | 2005.0,2.0,12587.535,8802.9,2131.468,870.044,9253.0,194.7,1366.6,3.01,5.1,295.994,1.85,1.16 188 | 2005.0,3.0,12683.153,8865.6,2154.949,890.394,9308.0,199.2,1375.0,3.52,5.0,296.77,9.14,-5.62 189 | 2005.0,4.0,12748.699,8888.5,2232.193,875.557,9358.7,199.4,1380.6,4.0,4.9,297.435,0.4,3.6 190 | 2006.0,1.0,12915.938,8986.6,2264.721,900.511,9533.8,200.7,1380.5,4.51,4.7,298.061,2.6,1.91 191 | 2006.0,2.0,12962.462,9035.0,2261.247,892.839,9617.3,202.7,1369.2,4.82,4.7,298.766,3.97,0.85 192 | 2006.0,3.0,12965.916,9090.7,2229.636,892.002,9662.5,201.9,1369.4,4.9,4.7,299.593,-1.58,6.48 193 | 2006.0,4.0,13060.679,9181.6,2165.966,894.404,9788.8,203.574,1373.6,4.92,4.4,300.32,3.3,1.62 194 | 2007.0,1.0,13099.901,9265.1,2132.609,882.766,9830.2,205.92,1379.7,4.95,4.5,300.977,4.58,0.36 195 | 2007.0,2.0,13203.977,9291.5,2162.214,898.713,9842.7,207.338,1370.0,4.72,4.5,301.714,2.75,1.97 196 | 2007.0,3.0,13321.109,9335.6,2166.491,918.983,9883.9,209.133,1379.2,4.0,4.7,302.509,3.45,0.55 197 | 2007.0,4.0,13391.249,9363.6,2123.426,925.11,9886.2,212.495,1377.4,3.01,4.8,303.204,6.38,-3.37 198 | 2008.0,1.0,13366.865,9349.6,2082.886,943.372,9826.8,213.997,1384.0,1.56,4.9,303.803,2.82,-1.26 199 | 2008.0,2.0,13415.266,9351.0,2026.518,961.28,10059.0,218.61,1409.3,1.74,5.4,304.483,8.53,-6.79 200 | 2008.0,3.0,13324.6,9267.7,1990.693,991.551,9838.3,216.889,1474.7,1.17,6.0,305.27,-3.16,4.33 201 | 2008.0,4.0,13141.92,9195.3,1857.661,1007.273,9920.4,212.174,1576.5,0.12,6.9,305.952,-8.79,8.91 202 | 2009.0,1.0,12925.41,9209.2,1558.494,996.287,9926.4,212.671,1592.8,0.22,8.1,306.547,0.94,-0.71 203 | 2009.0,2.0,12901.504,9189.0,1456.678,1023.528,10077.5,214.469,1653.6,0.18,9.2,307.226,3.37,-3.19 204 | 2009.0,3.0,12990.341,9256.0,1486.398,1044.088,10040.6,216.385,1673.9,0.12,9.6,308.013,3.56,-3.44 205 | -------------------------------------------------------------------------------- /tips.csv: -------------------------------------------------------------------------------- 1 | total_bill,tip,smoker,day,time,size 2 | 16.99,1.01,No,Sun,Dinner,2 3 | 10.34,1.66,No,Sun,Dinner,3 4 | 21.01,3.5,No,Sun,Dinner,3 5 | 23.68,3.31,No,Sun,Dinner,2 6 | 24.59,3.61,No,Sun,Dinner,4 7 | 25.29,4.71,No,Sun,Dinner,4 8 | 8.77,2.0,No,Sun,Dinner,2 9 | 26.88,3.12,No,Sun,Dinner,4 10 | 15.04,1.96,No,Sun,Dinner,2 11 | 14.78,3.23,No,Sun,Dinner,2 12 | 10.27,1.71,No,Sun,Dinner,2 13 | 35.26,5.0,No,Sun,Dinner,4 14 | 15.42,1.57,No,Sun,Dinner,2 15 | 18.43,3.0,No,Sun,Dinner,4 16 | 14.83,3.02,No,Sun,Dinner,2 17 | 21.58,3.92,No,Sun,Dinner,2 18 | 10.33,1.67,No,Sun,Dinner,3 19 | 16.29,3.71,No,Sun,Dinner,3 20 | 16.97,3.5,No,Sun,Dinner,3 21 | 20.65,3.35,No,Sat,Dinner,3 22 | 17.92,4.08,No,Sat,Dinner,2 23 | 20.29,2.75,No,Sat,Dinner,2 24 | 15.77,2.23,No,Sat,Dinner,2 25 | 39.42,7.58,No,Sat,Dinner,4 26 | 19.82,3.18,No,Sat,Dinner,2 27 | 17.81,2.34,No,Sat,Dinner,4 28 | 13.37,2.0,No,Sat,Dinner,2 29 | 12.69,2.0,No,Sat,Dinner,2 30 | 21.7,4.3,No,Sat,Dinner,2 31 | 19.65,3.0,No,Sat,Dinner,2 32 | 9.55,1.45,No,Sat,Dinner,2 33 | 18.35,2.5,No,Sat,Dinner,4 34 | 15.06,3.0,No,Sat,Dinner,2 35 | 20.69,2.45,No,Sat,Dinner,4 36 | 17.78,3.27,No,Sat,Dinner,2 37 | 24.06,3.6,No,Sat,Dinner,3 38 | 16.31,2.0,No,Sat,Dinner,3 39 | 16.93,3.07,No,Sat,Dinner,3 40 | 18.69,2.31,No,Sat,Dinner,3 41 | 31.27,5.0,No,Sat,Dinner,3 42 | 16.04,2.24,No,Sat,Dinner,3 43 | 17.46,2.54,No,Sun,Dinner,2 44 | 13.94,3.06,No,Sun,Dinner,2 45 | 9.68,1.32,No,Sun,Dinner,2 46 | 30.4,5.6,No,Sun,Dinner,4 47 | 18.29,3.0,No,Sun,Dinner,2 48 | 22.23,5.0,No,Sun,Dinner,2 49 | 32.4,6.0,No,Sun,Dinner,4 50 | 28.55,2.05,No,Sun,Dinner,3 51 | 18.04,3.0,No,Sun,Dinner,2 52 | 12.54,2.5,No,Sun,Dinner,2 53 | 10.29,2.6,No,Sun,Dinner,2 54 | 34.81,5.2,No,Sun,Dinner,4 55 | 9.94,1.56,No,Sun,Dinner,2 56 | 25.56,4.34,No,Sun,Dinner,4 57 | 19.49,3.51,No,Sun,Dinner,2 58 | 38.01,3.0,Yes,Sat,Dinner,4 59 | 26.41,1.5,No,Sat,Dinner,2 60 | 11.24,1.76,Yes,Sat,Dinner,2 61 | 48.27,6.73,No,Sat,Dinner,4 62 | 20.29,3.21,Yes,Sat,Dinner,2 63 | 13.81,2.0,Yes,Sat,Dinner,2 64 | 11.02,1.98,Yes,Sat,Dinner,2 65 | 18.29,3.76,Yes,Sat,Dinner,4 66 | 17.59,2.64,No,Sat,Dinner,3 67 | 20.08,3.15,No,Sat,Dinner,3 68 | 16.45,2.47,No,Sat,Dinner,2 69 | 3.07,1.0,Yes,Sat,Dinner,1 70 | 20.23,2.01,No,Sat,Dinner,2 71 | 15.01,2.09,Yes,Sat,Dinner,2 72 | 12.02,1.97,No,Sat,Dinner,2 73 | 17.07,3.0,No,Sat,Dinner,3 74 | 26.86,3.14,Yes,Sat,Dinner,2 75 | 25.28,5.0,Yes,Sat,Dinner,2 76 | 14.73,2.2,No,Sat,Dinner,2 77 | 10.51,1.25,No,Sat,Dinner,2 78 | 17.92,3.08,Yes,Sat,Dinner,2 79 | 27.2,4.0,No,Thur,Lunch,4 80 | 22.76,3.0,No,Thur,Lunch,2 81 | 17.29,2.71,No,Thur,Lunch,2 82 | 19.44,3.0,Yes,Thur,Lunch,2 83 | 16.66,3.4,No,Thur,Lunch,2 84 | 10.07,1.83,No,Thur,Lunch,1 85 | 32.68,5.0,Yes,Thur,Lunch,2 86 | 15.98,2.03,No,Thur,Lunch,2 87 | 34.83,5.17,No,Thur,Lunch,4 88 | 13.03,2.0,No,Thur,Lunch,2 89 | 18.28,4.0,No,Thur,Lunch,2 90 | 24.71,5.85,No,Thur,Lunch,2 91 | 21.16,3.0,No,Thur,Lunch,2 92 | 28.97,3.0,Yes,Fri,Dinner,2 93 | 22.49,3.5,No,Fri,Dinner,2 94 | 5.75,1.0,Yes,Fri,Dinner,2 95 | 16.32,4.3,Yes,Fri,Dinner,2 96 | 22.75,3.25,No,Fri,Dinner,2 97 | 40.17,4.73,Yes,Fri,Dinner,4 98 | 27.28,4.0,Yes,Fri,Dinner,2 99 | 12.03,1.5,Yes,Fri,Dinner,2 100 | 21.01,3.0,Yes,Fri,Dinner,2 101 | 12.46,1.5,No,Fri,Dinner,2 102 | 11.35,2.5,Yes,Fri,Dinner,2 103 | 15.38,3.0,Yes,Fri,Dinner,2 104 | 44.3,2.5,Yes,Sat,Dinner,3 105 | 22.42,3.48,Yes,Sat,Dinner,2 106 | 20.92,4.08,No,Sat,Dinner,2 107 | 15.36,1.64,Yes,Sat,Dinner,2 108 | 20.49,4.06,Yes,Sat,Dinner,2 109 | 25.21,4.29,Yes,Sat,Dinner,2 110 | 18.24,3.76,No,Sat,Dinner,2 111 | 14.31,4.0,Yes,Sat,Dinner,2 112 | 14.0,3.0,No,Sat,Dinner,2 113 | 7.25,1.0,No,Sat,Dinner,1 114 | 38.07,4.0,No,Sun,Dinner,3 115 | 23.95,2.55,No,Sun,Dinner,2 116 | 25.71,4.0,No,Sun,Dinner,3 117 | 17.31,3.5,No,Sun,Dinner,2 118 | 29.93,5.07,No,Sun,Dinner,4 119 | 10.65,1.5,No,Thur,Lunch,2 120 | 12.43,1.8,No,Thur,Lunch,2 121 | 24.08,2.92,No,Thur,Lunch,4 122 | 11.69,2.31,No,Thur,Lunch,2 123 | 13.42,1.68,No,Thur,Lunch,2 124 | 14.26,2.5,No,Thur,Lunch,2 125 | 15.95,2.0,No,Thur,Lunch,2 126 | 12.48,2.52,No,Thur,Lunch,2 127 | 29.8,4.2,No,Thur,Lunch,6 128 | 8.52,1.48,No,Thur,Lunch,2 129 | 14.52,2.0,No,Thur,Lunch,2 130 | 11.38,2.0,No,Thur,Lunch,2 131 | 22.82,2.18,No,Thur,Lunch,3 132 | 19.08,1.5,No,Thur,Lunch,2 133 | 20.27,2.83,No,Thur,Lunch,2 134 | 11.17,1.5,No,Thur,Lunch,2 135 | 12.26,2.0,No,Thur,Lunch,2 136 | 18.26,3.25,No,Thur,Lunch,2 137 | 8.51,1.25,No,Thur,Lunch,2 138 | 10.33,2.0,No,Thur,Lunch,2 139 | 14.15,2.0,No,Thur,Lunch,2 140 | 16.0,2.0,Yes,Thur,Lunch,2 141 | 13.16,2.75,No,Thur,Lunch,2 142 | 17.47,3.5,No,Thur,Lunch,2 143 | 34.3,6.7,No,Thur,Lunch,6 144 | 41.19,5.0,No,Thur,Lunch,5 145 | 27.05,5.0,No,Thur,Lunch,6 146 | 16.43,2.3,No,Thur,Lunch,2 147 | 8.35,1.5,No,Thur,Lunch,2 148 | 18.64,1.36,No,Thur,Lunch,3 149 | 11.87,1.63,No,Thur,Lunch,2 150 | 9.78,1.73,No,Thur,Lunch,2 151 | 7.51,2.0,No,Thur,Lunch,2 152 | 14.07,2.5,No,Sun,Dinner,2 153 | 13.13,2.0,No,Sun,Dinner,2 154 | 17.26,2.74,No,Sun,Dinner,3 155 | 24.55,2.0,No,Sun,Dinner,4 156 | 19.77,2.0,No,Sun,Dinner,4 157 | 29.85,5.14,No,Sun,Dinner,5 158 | 48.17,5.0,No,Sun,Dinner,6 159 | 25.0,3.75,No,Sun,Dinner,4 160 | 13.39,2.61,No,Sun,Dinner,2 161 | 16.49,2.0,No,Sun,Dinner,4 162 | 21.5,3.5,No,Sun,Dinner,4 163 | 12.66,2.5,No,Sun,Dinner,2 164 | 16.21,2.0,No,Sun,Dinner,3 165 | 13.81,2.0,No,Sun,Dinner,2 166 | 17.51,3.0,Yes,Sun,Dinner,2 167 | 24.52,3.48,No,Sun,Dinner,3 168 | 20.76,2.24,No,Sun,Dinner,2 169 | 31.71,4.5,No,Sun,Dinner,4 170 | 10.59,1.61,Yes,Sat,Dinner,2 171 | 10.63,2.0,Yes,Sat,Dinner,2 172 | 50.81,10.0,Yes,Sat,Dinner,3 173 | 15.81,3.16,Yes,Sat,Dinner,2 174 | 7.25,5.15,Yes,Sun,Dinner,2 175 | 31.85,3.18,Yes,Sun,Dinner,2 176 | 16.82,4.0,Yes,Sun,Dinner,2 177 | 32.9,3.11,Yes,Sun,Dinner,2 178 | 17.89,2.0,Yes,Sun,Dinner,2 179 | 14.48,2.0,Yes,Sun,Dinner,2 180 | 9.6,4.0,Yes,Sun,Dinner,2 181 | 34.63,3.55,Yes,Sun,Dinner,2 182 | 34.65,3.68,Yes,Sun,Dinner,4 183 | 23.33,5.65,Yes,Sun,Dinner,2 184 | 45.35,3.5,Yes,Sun,Dinner,3 185 | 23.17,6.5,Yes,Sun,Dinner,4 186 | 40.55,3.0,Yes,Sun,Dinner,2 187 | 20.69,5.0,No,Sun,Dinner,5 188 | 20.9,3.5,Yes,Sun,Dinner,3 189 | 30.46,2.0,Yes,Sun,Dinner,5 190 | 18.15,3.5,Yes,Sun,Dinner,3 191 | 23.1,4.0,Yes,Sun,Dinner,3 192 | 15.69,1.5,Yes,Sun,Dinner,2 193 | 19.81,4.19,Yes,Thur,Lunch,2 194 | 28.44,2.56,Yes,Thur,Lunch,2 195 | 15.48,2.02,Yes,Thur,Lunch,2 196 | 16.58,4.0,Yes,Thur,Lunch,2 197 | 7.56,1.44,No,Thur,Lunch,2 198 | 10.34,2.0,Yes,Thur,Lunch,2 199 | 43.11,5.0,Yes,Thur,Lunch,4 200 | 13.0,2.0,Yes,Thur,Lunch,2 201 | 13.51,2.0,Yes,Thur,Lunch,2 202 | 18.71,4.0,Yes,Thur,Lunch,3 203 | 12.74,2.01,Yes,Thur,Lunch,2 204 | 13.0,2.0,Yes,Thur,Lunch,2 205 | 16.4,2.5,Yes,Thur,Lunch,2 206 | 20.53,4.0,Yes,Thur,Lunch,4 207 | 16.47,3.23,Yes,Thur,Lunch,3 208 | 26.59,3.41,Yes,Sat,Dinner,3 209 | 38.73,3.0,Yes,Sat,Dinner,4 210 | 24.27,2.03,Yes,Sat,Dinner,2 211 | 12.76,2.23,Yes,Sat,Dinner,2 212 | 30.06,2.0,Yes,Sat,Dinner,3 213 | 25.89,5.16,Yes,Sat,Dinner,4 214 | 48.33,9.0,No,Sat,Dinner,4 215 | 13.27,2.5,Yes,Sat,Dinner,2 216 | 28.17,6.5,Yes,Sat,Dinner,3 217 | 12.9,1.1,Yes,Sat,Dinner,2 218 | 28.15,3.0,Yes,Sat,Dinner,5 219 | 11.59,1.5,Yes,Sat,Dinner,2 220 | 7.74,1.44,Yes,Sat,Dinner,2 221 | 30.14,3.09,Yes,Sat,Dinner,4 222 | 12.16,2.2,Yes,Fri,Lunch,2 223 | 13.42,3.48,Yes,Fri,Lunch,2 224 | 8.58,1.92,Yes,Fri,Lunch,1 225 | 15.98,3.0,No,Fri,Lunch,3 226 | 13.42,1.58,Yes,Fri,Lunch,2 227 | 16.27,2.5,Yes,Fri,Lunch,2 228 | 10.09,2.0,Yes,Fri,Lunch,2 229 | 20.45,3.0,No,Sat,Dinner,4 230 | 13.28,2.72,No,Sat,Dinner,2 231 | 22.12,2.88,Yes,Sat,Dinner,2 232 | 24.01,2.0,Yes,Sat,Dinner,4 233 | 15.69,3.0,Yes,Sat,Dinner,3 234 | 11.61,3.39,No,Sat,Dinner,2 235 | 10.77,1.47,No,Sat,Dinner,2 236 | 15.53,3.0,Yes,Sat,Dinner,2 237 | 10.07,1.25,No,Sat,Dinner,2 238 | 12.6,1.0,Yes,Sat,Dinner,2 239 | 32.83,1.17,Yes,Sat,Dinner,2 240 | 35.83,4.67,No,Sat,Dinner,3 241 | 29.03,5.92,No,Sat,Dinner,3 242 | 27.18,2.0,Yes,Sat,Dinner,2 243 | 22.67,2.0,Yes,Sat,Dinner,2 244 | 17.82,1.75,No,Sat,Dinner,2 245 | 18.78,3.0,No,Thur,Dinner,2 246 | --------------------------------------------------------------------------------