|
43 | 43 | }, |
44 | 44 | { |
45 | 45 | "cell_type": "code", |
46 | | - "execution_count": null, |
| 46 | + "execution_count": 1, |
47 | 47 | "metadata": {}, |
48 | 48 | "outputs": [], |
49 | 49 | "source": [ |
|
52 | 52 | }, |
53 | 53 | { |
54 | 54 | "cell_type": "code", |
55 | | - "execution_count": null, |
| 55 | + "execution_count": 2, |
56 | 56 | "metadata": {}, |
57 | 57 | "outputs": [], |
58 | 58 | "source": [ |
|
62 | 62 | }, |
63 | 63 | { |
64 | 64 | "cell_type": "code", |
65 | | - "execution_count": null, |
| 65 | + "execution_count": 3, |
66 | 66 | "metadata": {}, |
67 | 67 | "outputs": [], |
68 | 68 | "source": [ |
|
77 | 77 | }, |
78 | 78 | { |
79 | 79 | "cell_type": "code", |
80 | | - "execution_count": null, |
| 80 | + "execution_count": 4, |
81 | 81 | "metadata": {}, |
82 | | - "outputs": [], |
| 82 | + "outputs": [ |
| 83 | + { |
| 84 | + "name": "stdout", |
| 85 | + "output_type": "stream", |
| 86 | + "text": [ |
| 87 | + "My dictionary:\n", |
| 88 | + " {'Data': array([442.16441153, 452.59212637, 390.30313461, 67.82492728,\n", |
| 89 | + " 376.21984205, 414.16615953, 453.52754296, 243.11081923,\n", |
| 90 | + " 420.51883898, 431.49123652, 385.32237165, 51.98104781,\n", |
| 91 | + " 205.06966285, 383.8989826 , 161.82066127, 453.33362064,\n", |
| 92 | + " 82.05730611, 479.5225805 , 63.27486875, 368.78270896]), 'Name': 'Cool name', 'Mean': 316.3491425107721, 'Sum': 6326.982850215441, 'Accessed': 0, 'Date': '3/11/2022'}\n" |
| 93 | + ] |
| 94 | + } |
| 95 | + ], |
83 | 96 | "source": [ |
84 | 97 | "# What does this look like if I print it out?\n", |
85 | 98 | "# Note that prints out pretty much with the same format you make it in\n", |
|
88 | 101 | }, |
89 | 102 | { |
90 | 103 | "cell_type": "code", |
91 | | - "execution_count": null, |
| 104 | + "execution_count": 5, |
92 | 105 | "metadata": {}, |
93 | 106 | "outputs": [], |
94 | 107 | "source": [ |
|
98 | 111 | }, |
99 | 112 | { |
100 | 113 | "cell_type": "code", |
101 | | - "execution_count": null, |
| 114 | + "execution_count": 6, |
102 | 115 | "metadata": {}, |
103 | | - "outputs": [], |
| 116 | + "outputs": [ |
| 117 | + { |
| 118 | + "name": "stdout", |
| 119 | + "output_type": "stream", |
| 120 | + "text": [ |
| 121 | + "Sum is in the dictionary, value 6326.982850215441\n" |
| 122 | + ] |
| 123 | + } |
| 124 | + ], |
104 | 125 | "source": [ |
105 | 126 | "# You can check if a key is in the dictionary like this\n", |
106 | 127 | "if \"Sum\" in my_dict:\n", |
|
109 | 130 | }, |
110 | 131 | { |
111 | 132 | "cell_type": "code", |
112 | | - "execution_count": null, |
| 133 | + "execution_count": 8, |
113 | 134 | "metadata": {}, |
114 | | - "outputs": [], |
| 135 | + "outputs": [ |
| 136 | + { |
| 137 | + "name": "stdout", |
| 138 | + "output_type": "stream", |
| 139 | + "text": [ |
| 140 | + "Found sum, value 6326.982850215441\n" |
| 141 | + ] |
| 142 | + } |
| 143 | + ], |
115 | 144 | "source": [ |
116 | 145 | "# [For illustration purposes only - do not do this] Loop through all the keys and see if one of them is Sum\n", |
117 | 146 | "for k in my_dict.keys():\n", |
|
377 | 406 | ], |
378 | 407 | "metadata": { |
379 | 408 | "kernelspec": { |
380 | | - "display_name": "Python 3", |
| 409 | + "display_name": "Python 3 (ipykernel)", |
381 | 410 | "language": "python", |
382 | 411 | "name": "python3" |
383 | 412 | }, |
|
391 | 420 | "name": "python", |
392 | 421 | "nbconvert_exporter": "python", |
393 | 422 | "pygments_lexer": "ipython3", |
394 | | - "version": "3.7.4" |
| 423 | + "version": "3.11.5" |
395 | 424 | } |
396 | 425 | }, |
397 | 426 | "nbformat": 4, |
|
0 commit comments