title
Jupyter Notebook Tutorial: Introduction, Setup, and Walkthrough

description
In this Python Tutorial, we will be learning how to install, setup, and use Jupyter Notebooks. Jupyter Notebooks have become very popular in the last few years, and for good reason. They allow you to create and share documents that contain live code, equations, visualizations and markdown text. This can all be run from directly in the browser. It is an essential tool to learn if you are getting started in Data Science, but will also have tons of benefits outside of that field. Let's get started. ✅ Support My Channel Through Patreon: https://www.patreon.com/coreyms ✅ Become a Channel Member: https://www.youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g/join ✅ One-Time Contribution Through PayPal: https://goo.gl/649HFY ✅ Cryptocurrency Donations: Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3 Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33 Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot ✅ Corey's Public Amazon Wishlist http://a.co/inIyro1 ✅ Equipment I Use and Books I Recommend: https://www.amazon.com/shop/coreyschafer ▶️ You Can Find Me On: My Website - http://coreyms.com/ My Second Channel - https://www.youtube.com/c/coreymschafer Facebook - https://www.facebook.com/CoreyMSchafer Twitter - https://twitter.com/CoreyMSchafer Instagram - https://www.instagram.com/coreymschafer/ #Python

detail
{'title': 'Jupyter Notebook Tutorial: Introduction, Setup, and Walkthrough', 'heatmap': [{'end': 258.61, 'start': 194.837, 'weight': 0.71}, {'end': 861.346, 'start': 812.21, 'weight': 0.853}], 'summary': "Tutorial introduces jupyter notebooks, emphasizing its interactive code running in a web browser, visualization and markdown capabilities, and its significance in scientific institutions like ligo's use in replicating research results. it also covers interactive data visualization, basics of using a jupyter notebook, executing python code, using markdown and bash commands, magic commands, and exporting ipython notebooks in various formats, including html, python file, and json structure.", 'chapters': [{'end': 73.593, 'segs': [{'end': 53.647, 'src': 'embed', 'start': 0.189, 'weight': 0, 'content': [{'end': 5.374, 'text': "Hey there, how's it going everybody? In this video we're going to be learning how to get started with using Jupyter Notebooks.", 'start': 0.189, 'duration': 5.185}, {'end': 12.28, 'text': "Now, if you don't know what a Jupyter Notebook is, this is basically a way for us to run code interactively within a web browser,", 'start': 5.714, 'duration': 6.566}, {'end': 17.245, 'text': "alongside some visualizations and some markdown text to explain the process of what's going on.", 'start': 12.28, 'duration': 4.965}, {'end': 23.989, 'text': "Now this Jupyter project evolved out of IPython, so if you've ever used IPython or heard someone talking about that,", 'start': 17.685, 'duration': 6.304}, {'end': 26.67, 'text': 'then that has now been rolled into this Jupyter project.', 'start': 23.989, 'duration': 2.681}, {'end': 33.494, 'text': "And there are some good reasons behind that that I won't go into too much detail about here, but they have an entire blog post on their website,", 'start': 26.91, 'duration': 6.584}, {'end': 34.515, 'text': 'if anyone is interested.', 'start': 33.494, 'duration': 1.021}, {'end': 40.679, 'text': 'So before we even get started, let me show you why this is useful and how powerful something like this can be.', 'start': 34.995, 'duration': 5.684}, {'end': 47.023, 'text': 'So a lot of scientific institutions are using these notebooks in order to clearly explain exactly how they got the results.', 'start': 41.299, 'duration': 5.724}, {'end': 53.647, 'text': 'And not only can these notebooks show us how they got the results, but we can reproduce the results from within the notebooks themselves.', 'start': 47.443, 'duration': 6.204}], 'summary': 'Learn to use jupyter notebooks for interactive coding and visualizations, useful for scientific institutions to explain and reproduce results.', 'duration': 53.458, 'max_score': 0.189, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HW29067qVWk/pics/HW29067qVWk189.jpg'}], 'start': 0.189, 'title': 'Introduction to jupyter notebooks', 'summary': "Introduces jupyter notebooks, highlighting its interactive code running in a web browser, visualization and markdown capabilities, and its significance in scientific institutions like ligo's use in replicating research results.", 'chapters': [{'end': 73.593, 'start': 0.189, 'title': 'Introduction to jupyter notebooks', 'summary': "Introduces jupyter notebooks, explaining its interactive code running in a web browser, visualization and markdown capabilities, and its significance in scientific institutions like ligo's use in replicating research results. it also mentions the evolution of jupyter from ipython.", 'duration': 73.404, 'highlights': ["Jupyter Notebooks allow interactive code running in a web browser, alongside visualizations and markdown text, making it a powerful tool for explaining processes (e.g., LIGO's use for replicating research results).", 'LIGO, the observatory that detected gravitational waves in late 2015, utilized Jupyter Notebooks to publish research in notebook form, enabling replication of processing using their own data.', 'Jupyter project evolved from IPython, consolidating its features and capabilities, making it a versatile tool for running code interactively.']}], 'duration': 73.404, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HW29067qVWk/pics/HW29067qVWk189.jpg', 'highlights': ["Jupyter Notebooks allow interactive code running in a web browser, alongside visualizations and markdown text, making it a powerful tool for explaining processes (e.g., LIGO's use for replicating research results).", 'LIGO, the observatory that detected gravitational waves in late 2015, utilized Jupyter Notebooks to publish research in notebook form, enabling replication of processing using their own data.', 'Jupyter project evolved from IPython, consolidating its features and capabilities, making it a versatile tool for running code interactively.']}, {'end': 390.943, 'segs': [{'end': 115.493, 'src': 'embed', 'start': 90.754, 'weight': 0, 'content': [{'end': 97.359, 'text': 'So the way that some of these notebooks are laid out, it almost looks like a blog post or a textbook or something like that.', 'start': 90.754, 'duration': 6.605}, {'end': 106.426, 'text': "But these charts and everything that we see here, these aren't just static visualizations like some PDF file or something like that.", 'start': 97.819, 'duration': 8.607}, {'end': 111.49, 'text': "These are visualizations that were produced right here in the browser by the code that we're looking at.", 'start': 106.846, 'duration': 4.644}, {'end': 115.493, 'text': 'and we can even tweak this code and rerun these cells to get different results.', 'start': 111.67, 'duration': 3.823}], 'summary': 'Notebooks resemble blog posts, with dynamic visualizations created in-browser.', 'duration': 24.739, 'max_score': 90.754, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HW29067qVWk/pics/HW29067qVWk90754.jpg'}, {'end': 258.61, 'src': 'heatmap', 'start': 194.837, 'weight': 0.71, 'content': [{'end': 200.923, 'text': "But if you don't want to use Anaconda, then they also have the pip installation instructions here as well.", 'start': 194.837, 'duration': 6.086}, {'end': 207.97, 'text': "So either method is up to you, but I would recommend installing Anaconda and that's what I'm going to use for this video.", 'start': 201.343, 'duration': 6.627}, {'end': 216.955, 'text': 'So once you run through the process of either installing Anaconda or doing the pip installs, then now we can just pull up our terminals here.', 'start': 208.51, 'duration': 8.445}, {'end': 223.459, 'text': "And I'm going to kill that notebook server that was running the LIGO notebooks.", 'start': 217.635, 'duration': 5.824}, {'end': 231.768, 'text': "And I'm going to cd into a blank directory here that is completely empty.", 'start': 224.319, 'duration': 7.449}, {'end': 234.371, 'text': "So now I'm starting from scratch in this directory.", 'start': 232.369, 'duration': 2.002}, {'end': 239.257, 'text': 'If I do an ls-la on a Mac, this is going to list out all the files and directories.', 'start': 234.411, 'duration': 4.846}, {'end': 241.48, 'text': "And you can see that it's completely empty.", 'start': 239.617, 'duration': 1.863}, {'end': 248.524, 'text': 'So now within this demo directory, to start a new notebook, we just have to say jupyter notebook.', 'start': 241.92, 'duration': 6.604}, {'end': 254.368, 'text': "And if I run that, it's going to start a server and pop up with this dashboard here.", 'start': 249.004, 'duration': 5.364}, {'end': 258.61, 'text': 'And this is on our local host port 8888.', 'start': 254.448, 'duration': 4.162}], 'summary': 'Installing anaconda or using pip for setup, then running jupyter notebook on local host port 8888.', 'duration': 63.773, 'max_score': 194.837, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HW29067qVWk/pics/HW29067qVWk194837.jpg'}, {'end': 297.73, 'src': 'embed', 'start': 258.61, 'weight': 4, 'content': [{'end': 262.375, 'text': 'Now that server that we started up in our terminal, you have to leave that running.', 'start': 258.61, 'duration': 3.765}, {'end': 263.857, 'text': "That's called a notebook server.", 'start': 262.415, 'duration': 1.442}, {'end': 272.629, 'text': "And if we were to close that window and shut down that server, then we wouldn't be able to access our notebooks within our local host.", 'start': 264.438, 'duration': 8.191}, {'end': 273.691, 'text': 'So you have to leave that running.', 'start': 272.649, 'duration': 1.042}, {'end': 277.613, 'text': "And you can see that currently in our dashboard here that we don't have much here.", 'start': 274.091, 'duration': 3.522}, {'end': 285.179, 'text': 'If we had any files or folders in that test directory where we started that notebook server from, then those would show up here.', 'start': 277.854, 'duration': 7.325}, {'end': 289.782, 'text': "But that directory was completely empty, so we don't have anything here yet.", 'start': 285.519, 'duration': 4.263}, {'end': 293.645, 'text': "Okay, so let's go ahead and jump right into creating a new notebook.", 'start': 290.302, 'duration': 3.343}, {'end': 297.73, 'text': "And in order to create a new notebook, you're going to have to have a kernel.", 'start': 294.106, 'duration': 3.624}], 'summary': 'To access notebooks locally, keep server running; empty directory currently.', 'duration': 39.12, 'max_score': 258.61, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HW29067qVWk/pics/HW29067qVWk258610.jpg'}], 'start': 73.593, 'title': 'Jupyter notebooks for interactive data visualization', 'summary': 'Covers the interactive nature of jupyter notebooks, enabling users to display markdown code, python code, and interactive charts, allowing modification and rerunning cells for different results, making it popular for data visualization and analysis. it also includes installing jupyter using anaconda or pip, starting a notebook server, creating a new notebook, selecting a kernel, and accessing help and keyboard shortcuts.', 'chapters': [{'end': 149.754, 'start': 73.593, 'title': 'Interactive data visualization with jupyter notebooks', 'summary': 'Discusses the interactive nature of jupyter notebooks, with the ability to display markdown code, python code, and interactive charts, allowing users to modify and rerun cells to obtain different results, making it a popular choice for data visualization and analysis.', 'duration': 76.161, 'highlights': ['The interactive nature of Jupyter Notebooks allows users to display Markdown code, Python code, and interactive charts, enabling them to modify and rerun cells for different results, making it a popular choice for data visualization and analysis.', 'The visualizations produced in Jupyter Notebooks are not static, but are generated in the browser by the code, allowing users to interact with the data and code, making it a powerful tool for data exploration and analysis.', 'The layout of Jupyter Notebooks resembles a blog post or textbook, providing a structured and organized format for presenting code, explanations, and visualizations, contributing to its popularity for data analysis and communication.', "The ability to modify and rerun code cells in Jupyter Notebooks allows for interactive data exploration and visualization, enhancing the user's understanding and analysis of the data, contributing to the widespread adoption of this tool."]}, {'end': 390.943, 'start': 149.774, 'title': 'Installing and using jupyter', 'summary': 'Covers installing jupyter using anaconda or pip, starting a notebook server, creating a new notebook, selecting a kernel, and accessing help and keyboard shortcuts.', 'duration': 241.169, 'highlights': ['Anaconda Python distribution is recommended for installing Jupyter, as it comes bundled with Jupyter installation The Anaconda Python distribution is recommended for installing Jupyter as it comes bundled with the Jupyter installation, providing ease and convenience.', 'Starting a new notebook requires selecting a kernel, which determines the programming language to be used, such as Python 3 Starting a new notebook requires selecting a kernel, which determines the programming language to be used. In the demonstration, the Python 3 kernel is selected for creating a new notebook.', 'User Interface Tour and Keyboard Shortcuts in the Help menu provide guidance for navigating Jupyter Notebook The User Interface Tour and Keyboard Shortcuts in the Help menu provide guidance for navigating the Jupyter Notebook, offering information on layout, icons and mode indicators, as well as a comprehensive list of keyboard shortcuts for command and edit mode.', 'Jupyter Notebook server must be kept running to access notebooks within localhost The Jupyter Notebook server must be kept running to access notebooks within localhost, ensuring continuous access to the notebooks created.']}], 'duration': 317.35, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HW29067qVWk/pics/HW29067qVWk73593.jpg', 'highlights': ['The interactive nature of Jupyter Notebooks allows users to display Markdown code, Python code, and interactive charts, enabling them to modify and rerun cells for different results, making it a popular choice for data visualization and analysis.', 'The visualizations produced in Jupyter Notebooks are not static, but are generated in the browser by the code, allowing users to interact with the data and code, making it a powerful tool for data exploration and analysis.', 'The layout of Jupyter Notebooks resembles a blog post or textbook, providing a structured and organized format for presenting code, explanations, and visualizations, contributing to its popularity for data analysis and communication.', "The ability to modify and rerun code cells in Jupyter Notebooks allows for interactive data exploration and visualization, enhancing the user's understanding and analysis of the data, contributing to the widespread adoption of this tool.", 'Anaconda Python distribution is recommended for installing Jupyter, as it comes bundled with Jupyter installation The Anaconda Python distribution is recommended for installing Jupyter as it comes bundled with the Jupyter installation, providing ease and convenience.', 'Starting a new notebook requires selecting a kernel, which determines the programming language to be used, such as Python 3 Starting a new notebook requires selecting a kernel, which determines the programming language to be used. In the demonstration, the Python 3 kernel is selected for creating a new notebook.', 'User Interface Tour and Keyboard Shortcuts in the Help menu provide guidance for navigating Jupyter Notebook The User Interface Tour and Keyboard Shortcuts in the Help menu provide guidance for navigating the Jupyter Notebook, offering information on layout, icons and mode indicators, as well as a comprehensive list of keyboard shortcuts for command and edit mode.', 'Jupyter Notebook server must be kept running to access notebooks within localhost The Jupyter Notebook server must be kept running to access notebooks within localhost, ensuring continuous access to the notebooks created.']}, {'end': 774.82, 'segs': [{'end': 464.81, 'src': 'embed', 'start': 436.464, 'weight': 0, 'content': [{'end': 440.205, 'text': 'And you can see when I did that, we got this green highlight around the cell.', 'start': 436.464, 'duration': 3.741}, {'end': 442.786, 'text': "So that's an indication that we're in Edit Mode.", 'start': 440.565, 'duration': 2.221}, {'end': 448.847, 'text': 'And another indication is up here in the top right, you see that we have this pencil icon here.', 'start': 443.426, 'duration': 5.421}, {'end': 452.248, 'text': 'If I hover over that, you can see that that says edit mode.', 'start': 449.307, 'duration': 2.941}, {'end': 460.889, 'text': 'Now if I hit the escape key to go back to command mode, then you can see that that pencil disappears and also our cell here turned blue.', 'start': 452.728, 'duration': 8.161}, {'end': 464.81, 'text': "But I did want to edit that cell, so let's go ahead and just click in there again.", 'start': 461.409, 'duration': 3.401}], 'summary': 'Demonstrating edit mode with green highlight and pencil icon, then switching back to command mode.', 'duration': 28.346, 'max_score': 436.464, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HW29067qVWk/pics/HW29067qVWk436464.jpg'}, {'end': 571.391, 'src': 'embed', 'start': 549.034, 'weight': 2, 'content': [{'end': 558.542, 'text': 'you can see that even though there was an empty cell below here, it still inserted this cell below the cell that we just executed.', 'start': 549.034, 'duration': 9.508}, {'end': 562.665, 'text': 'So those are the differences between those three different options there.', 'start': 559.122, 'duration': 3.543}, {'end': 571.391, 'text': "And the shortcut keys for those, at least on a Mac, is Control Enter to just execute the cell that you're currently in and stay there.", 'start': 563.225, 'duration': 8.166}], 'summary': 'Comparison of cell insertion options in jupyter, with shortcut keys for mac users.', 'duration': 22.357, 'max_score': 549.034, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HW29067qVWk/pics/HW29067qVWk549034.jpg'}, {'end': 715.083, 'src': 'embed', 'start': 680.866, 'weight': 1, 'content': [{'end': 686.131, 'text': 'And now, if I come back here to this top cell, and rerun this code here now,', 'start': 680.866, 'duration': 5.265}, {'end': 693.698, 'text': "you can see that that name variable printed out as having the value of Corey, even though we didn't make that assignment until after that cell.", 'start': 686.131, 'duration': 7.567}, {'end': 701.24, 'text': "And it's because these numbers here determine the execution order, not just how things are assigned from top to bottom.", 'start': 694.218, 'duration': 7.022}, {'end': 705.201, 'text': 'Now, with that said, you still want these notebooks to be readable and easy to understand.', 'start': 701.7, 'duration': 3.501}, {'end': 709.122, 'text': 'So I would still suggest putting things in the correct order from top to bottom.', 'start': 705.581, 'duration': 3.541}, {'end': 715.083, 'text': "But if you ever have a variable that doesn't have the value that you think it should have,", 'start': 709.902, 'duration': 5.181}], 'summary': 'Execution order in notebooks affects variable values. notebooks should still be organized top to bottom for readability.', 'duration': 34.217, 'max_score': 680.866, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HW29067qVWk/pics/HW29067qVWk680866.jpg'}], 'start': 391.383, 'title': 'Jupyter notebook basics and executing python code', 'summary': 'Covers the basics of using a jupyter notebook, including file management, cell execution, and keyboard shortcuts, as well as executing python code, emphasizing interactive prompt nature and cell execution order.', 'chapters': [{'end': 597.198, 'start': 391.383, 'title': 'Jupyter notebook basics', 'summary': 'Explains the basics of using a jupyter notebook, including renaming the file, switching between command and edit modes, adding and executing code cells, and using keyboard shortcuts for efficient navigation.', 'duration': 205.815, 'highlights': ["Jupyter notebook basics: Renaming and adding content The video begins with renaming the notebook file to 'testing jupiter' and explaining the command mode and edit mode for adding and editing content in cells.", "Executing code in Jupyter notebook The process of executing code in Jupyter notebook is demonstrated, including using the 'run cell' options and their shortcut keys for efficient execution and cell navigation.", "Keyboard shortcuts for efficient navigation The use of keyboard shortcuts like 'Control Enter' to execute the current cell, 'Shift Enter' to execute and select the next cell, and 'Option Enter' to execute and insert a cell below is emphasized for quick navigation."]}, {'end': 774.82, 'start': 597.198, 'title': 'Executing python code in jupyter notebooks', 'summary': 'Explains how to execute python code in jupyter notebooks, highlighting the interactive prompt nature, cell execution order, and options for running cells efficiently.', 'duration': 177.622, 'highlights': ['The cells in Jupyter Notebooks behave like an interactive prompt, allowing code execution without explicitly using print statements.', 'The numbers beside the cells indicate the order of execution, allowing flexibility in running cells in a non-linear manner.', "The 'Run All' option in the cell menu enables executing all cells from top to bottom, ensuring expected variable values and sequential execution.", 'Jupyter Notebooks provide the flexibility to execute all cells above or below the current cell, allowing efficient re-execution of specific sections of code.']}], 'duration': 383.437, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HW29067qVWk/pics/HW29067qVWk391383.jpg', 'highlights': ["The 'Run All' option in the cell menu enables executing all cells from top to bottom, ensuring expected variable values and sequential execution.", 'The numbers beside the cells indicate the order of execution, allowing flexibility in running cells in a non-linear manner.', 'The cells in Jupyter Notebooks behave like an interactive prompt, allowing code execution without explicitly using print statements.', 'Jupyter Notebooks provide the flexibility to execute all cells above or below the current cell, allowing efficient re-execution of specific sections of code.', "Executing code in Jupyter notebook The process of executing code in Jupyter notebook is demonstrated, including using the 'run cell' options and their shortcut keys for efficient execution and cell navigation.", "Keyboard shortcuts for efficient navigation The use of keyboard shortcuts like 'Control Enter' to execute the current cell, 'Shift Enter' to execute and select the next cell, and 'Option Enter' to execute and insert a cell below is emphasized for quick navigation.", "Jupyter notebook basics: Renaming and adding content The video begins with renaming the notebook file to 'testing jupiter' and explaining the command mode and edit mode for adding and editing content in cells."]}, {'end': 1009.073, 'segs': [{'end': 861.346, 'src': 'heatmap', 'start': 794.576, 'weight': 1, 'content': [{'end': 803.243, 'text': "So first I'm going to select this top cell and now I'm going to add a new cell to the top by going insert and then insert cell above.", 'start': 794.576, 'duration': 8.667}, {'end': 811.71, 'text': "And now with that top cell selected, I'm going to come up here and click cell, go down to cell type and I'm going to choose markdown.", 'start': 803.743, 'duration': 7.967}, {'end': 820.614, 'text': "Now, this isn't a Markdown tutorial, so I'm not going to go into detail about exactly what Markdown text gets translated in HTML,", 'start': 812.21, 'duration': 8.404}, {'end': 826.017, 'text': "but I'm just going to drop in some sample Markdown from a snippets file that I have pulled up here.", 'start': 820.614, 'duration': 5.403}, {'end': 832.741, 'text': "So I'm just going to grab all of this sample Markdown here, and I'm just going to paste this into our top cell.", 'start': 826.037, 'duration': 6.704}, {'end': 835.521, 'text': "Now you can see that while we're still on our edit mode here,", 'start': 833.161, 'duration': 2.36}, {'end': 840.542, 'text': "it kind of gives us a little sample of what we're going to get once we actually execute this cell.", 'start': 835.521, 'duration': 5.021}, {'end': 844.863, 'text': "But we still have our markdown here that hasn't been translated completely yet.", 'start': 841.302, 'duration': 3.561}, {'end': 848.604, 'text': "So I'm going to go ahead and just run that by hitting control enter.", 'start': 845.263, 'duration': 3.341}, {'end': 853.585, 'text': 'Then when we run that, you can see that our markdown got translated to HTML.', 'start': 849.064, 'duration': 4.521}, {'end': 861.346, 'text': 'So we have a header here, a header two, a list, and we have some italics and bold and things like that.', 'start': 853.625, 'duration': 7.721}], 'summary': 'Demonstration of translating markdown to html, executed successfully.', 'duration': 26.038, 'max_score': 794.576, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HW29067qVWk/pics/HW29067qVWk794576.jpg'}, {'end': 898.07, 'src': 'embed', 'start': 864.808, 'weight': 3, 'content': [{'end': 868.711, 'text': "Now let's take a look at some other useful features that we can use within these notebooks.", 'start': 864.808, 'duration': 3.903}, {'end': 872.953, 'text': 'So our current kernel here is using Python.', 'start': 869.091, 'duration': 3.862}, {'end': 877.957, 'text': 'So any normal code that we add to our cells here will be interpreted as Python code.', 'start': 873.274, 'duration': 4.683}, {'end': 883.981, 'text': "But there are some special commands that we can use within our cells that won't just be seen as Python code.", 'start': 878.377, 'duration': 5.604}, {'end': 889.264, 'text': "So for example here, I'm going to add another cell here below this.", 'start': 884.681, 'duration': 4.583}, {'end': 898.07, 'text': "So one of these special commands is if you put an exclamation point, then it'll interpret this command as a bash command.", 'start': 890.265, 'duration': 7.805}], 'summary': "Notebooks support special commands, e.g., '!' for bash commands.", 'duration': 33.262, 'max_score': 864.808, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HW29067qVWk/pics/HW29067qVWk864808.jpg'}, {'end': 1009.073, 'src': 'embed', 'start': 963.032, 'weight': 0, 'content': [{'end': 967.056, 'text': 'So now you can see that it lists out all of these magic commands that we can use.', 'start': 963.032, 'duration': 4.024}, {'end': 972.122, 'text': 'And it splits these up into line magics here and cell magics here.', 'start': 967.397, 'duration': 4.725}, {'end': 975.106, 'text': "So let's go ahead and take a look at a couple of these.", 'start': 972.523, 'duration': 2.583}, {'end': 983.407, 'text': "So I'm going to go ahead and insert a cell below here so that we can still see all of these magics as we're working with these.", 'start': 975.626, 'duration': 7.781}, {'end': 987.908, 'text': 'So now, if I wanted to print out my current working directory,', 'start': 984.128, 'duration': 3.78}, {'end': 994.509, 'text': 'then I could just use a single percent sign here and do a PWD for print working directory.', 'start': 987.908, 'duration': 6.601}, {'end': 998.87, 'text': "If I run that, then you can see that it shows the directory that we're currently in.", 'start': 994.949, 'duration': 3.921}, {'end': 1003.651, 'text': 'And you can see in this list of available line magics, they also have an LS here.', 'start': 999.31, 'duration': 4.341}, {'end': 1009.073, 'text': 'So I can list the files and folders within that directory by doing an ls.', 'start': 1004.111, 'duration': 4.962}], 'summary': 'Introduction to jupyter magic commands: line and cell magics, pwd, ls.', 'duration': 46.041, 'max_score': 963.032, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HW29067qVWk/pics/HW29067qVWk963032.jpg'}], 'start': 775.181, 'title': 'Using markdown and bash commands in python notebooks', 'summary': "Covers adding markdown to notebooks, showcasing the process and outcome, and introducing special commands in python notebooks, including using '!' to interpret bash commands and running 'pip list'. it also explains how to run bash commands using line and cell magics and demonstrates the use of 'lsmagic' to list available commands.", 'chapters': [{'end': 864.448, 'start': 775.181, 'title': 'Adding markdown to notebooks', 'summary': 'Demonstrates how to add markup to notebooks, specifically markdown text that gets translated to html, showcasing the process and the outcome of adding markdown to a notebook.', 'duration': 89.267, 'highlights': ['The process of adding Markdown to a notebook is explained step by step, from selecting the cell and choosing the cell type to running the cell, resulting in the translation of Markdown to HTML.', 'The example highlights the translation of Markdown to HTML, including headers, lists, italics, and bold text, showcasing the practical application of adding Markdown to a notebook.', 'Explanation of Markdown details and its translation to HTML is briefly mentioned, providing context for the process of adding Markdown to a notebook.']}, {'end': 903.233, 'start': 864.808, 'title': 'Notebook features overview', 'summary': "Introduces special commands within python notebooks, including using '!' to interpret a command as a bash command and the example of running 'pip list' using the '!' command.", 'duration': 38.425, 'highlights': ["The chapter introduces special commands within Python notebooks, including using '!' to interpret a command as a bash command and the example of running 'pip list' using the '!' command.", 'The current kernel is using Python, and any normal code added to the cells will be interpreted as Python code.']}, {'end': 1009.073, 'start': 903.233, 'title': 'Running bash commands in notebooks', 'summary': "Explains how to run bash commands within notebooks using line and cell magics, and demonstrates the use of 'lsmagic' to list all available commands.", 'duration': 105.84, 'highlights': ["Notebooks allow running bash commands using line and cell magics, with 'lsmagic' command listing all available commands.", 'Line magics use a single percent sign for commands with arguments from the same line, while cell magics use two percent signs for commands with arguments from the entire cell.', "Demonstrates the use of 'PWD' command to print the current working directory using a single percent sign.", "Illustrates the use of 'ls' command to list files and folders within the directory using line magics."]}], 'duration': 233.892, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HW29067qVWk/pics/HW29067qVWk775181.jpg', 'highlights': ['The process of adding Markdown to a notebook is explained step by step, resulting in the translation of Markdown to HTML.', "Notebooks allow running bash commands using line and cell magics, with 'lsmagic' command listing all available commands.", 'The example highlights the translation of Markdown to HTML, showcasing the practical application of adding Markdown to a notebook.', "The chapter introduces special commands within Python notebooks, including using '!' to interpret a command as a bash command and the example of running 'pip list' using the '!' command.", 'Line magics use a single percent sign for commands with arguments from the same line, while cell magics use two percent signs for commands with arguments from the entire cell.']}, {'end': 1421.595, 'segs': [{'end': 1082.121, 'src': 'embed', 'start': 1052.317, 'weight': 0, 'content': [{'end': 1057.881, 'text': 'And that is matplotlib and then inline.', 'start': 1052.317, 'duration': 5.564}, {'end': 1063.966, 'text': 'So what that does is it allows matplotlib charts to be displayed within our notebook.', 'start': 1058.482, 'duration': 5.484}, {'end': 1068.19, 'text': "So I'm actually not going to execute this just yet.", 'start': 1064.326, 'duration': 3.864}, {'end': 1072.413, 'text': "And I'm going to insert a cell below here.", 'start': 1068.69, 'duration': 3.723}, {'end': 1082.121, 'text': "And first, I'm going to grab some sample code here from my snippets that will create a very simple matplotlib chart.", 'start': 1072.993, 'duration': 9.128}], 'summary': 'Using matplotlib and inline to display charts in notebook.', 'duration': 29.804, 'max_score': 1052.317, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HW29067qVWk/pics/HW29067qVWk1052317.jpg'}, {'end': 1229.66, 'src': 'embed', 'start': 1205.345, 'weight': 4, 'content': [{'end': 1213.371, 'text': 'So if I go ahead and run this cell, then you can see that we can actually embed this iframe directly in our notebook here.', 'start': 1205.345, 'duration': 8.026}, {'end': 1217.253, 'text': "And really, you can use that to render any kind of HTML that you'd want.", 'start': 1213.971, 'duration': 3.282}, {'end': 1223.096, 'text': 'So you can render images or links or anything like that directly within the notebook here.', 'start': 1217.313, 'duration': 5.783}, {'end': 1229.66, 'text': "So I'm not going to show an example of all of these commands, but I do kind of want to highlight a couple of things that you can do.", 'start': 1223.616, 'duration': 6.044}], 'summary': 'Demonstrating embedding iframes in notebook for rendering html content.', 'duration': 24.315, 'max_score': 1205.345, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HW29067qVWk/pics/HW29067qVWk1205345.jpg'}, {'end': 1375.134, 'src': 'embed', 'start': 1327.508, 'weight': 1, 'content': [{'end': 1332.878, 'text': "then you can see all the ones that are available for you here and you can just play around with any of these that you'd like.", 'start': 1327.508, 'duration': 5.37}, {'end': 1341.383, 'text': 'Now these Jupyter notebooks also have the ability to render certain things within the notebook without any kind of magic commands.', 'start': 1333.735, 'duration': 7.648}, {'end': 1349.611, 'text': 'So for example, we can also display a pandas data frame from directly within a notebook.', 'start': 1342.084, 'duration': 7.527}, {'end': 1353.535, 'text': "Now I thought I had a snippet for this, but apparently I don't.", 'start': 1350.332, 'duration': 3.203}, {'end': 1355.898, 'text': "So I'll just go ahead and write this out really quick.", 'start': 1353.555, 'duration': 2.343}, {'end': 1364.945, 'text': "So if we want to import pandas, I'll do import pandas as pd and import numpy as mp.", 'start': 1356.258, 'duration': 8.687}, {'end': 1368.408, 'text': "And now I'm just going to create a data frame here with some random values.", 'start': 1365.386, 'duration': 3.022}, {'end': 1371.431, 'text': "So I'll do a pandas data frame.", 'start': 1368.468, 'duration': 2.963}, {'end': 1375.134, 'text': "And I'm just going to put some random numpy values in here.", 'start': 1371.451, 'duration': 3.683}], 'summary': 'Jupyter notebooks can render pandas data frames and numpy values directly within the notebook.', 'duration': 47.626, 'max_score': 1327.508, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HW29067qVWk/pics/HW29067qVWk1327508.jpg'}], 'start': 1009.313, 'title': 'Magic commands in jupyter notebooks', 'summary': 'Covers the usage and benefits of magic commands in jupyter notebooks, such as displaying plots, rendering html, timing python code, and showing pandas data frames, enabling real-time data exploration without rerunning the entire script.', 'chapters': [{'end': 1127.915, 'start': 1009.313, 'title': 'Utilizing magic commands in ipython notebook', 'summary': 'Demonstrates the use of magic commands in an ipython notebook, including running normal commands, utilizing the matplotlib inline command, and handling matplotlib chart display issues.', 'duration': 118.602, 'highlights': ['The chapter demonstrates the use of magic commands in an IPython notebook, including running normal commands, utilizing the matplotlib inline command, and handling matplotlib chart display issues.', 'The matplotlib inline command allows matplotlib charts to be displayed within the notebook, enhancing visualization capabilities.', 'Running normal commands within the notebook, such as ls-la, provides similar functionality to running bash commands in a terminal, enabling file listing and user permission display.']}, {'end': 1421.595, 'start': 1128.296, 'title': 'Using magic commands in jupyter notebooks', 'summary': 'Discusses the usage and benefits of magic commands in jupyter notebooks, including displaying plots, rendering html, timing python code, and displaying pandas data frames, which enables real-time data exploration without rerunning the entire script.', 'duration': 293.299, 'highlights': ['The ability to display plots and render HTML directly within Jupyter Notebooks enhances real-time data exploration without rerunning the entire script.', "The 'timeit' magic command allows easy addition of code timing functionality, providing the average time taken to execute code and aiding in comparing the execution time of different functions.", "The 'ls' magic command provides a list of available magic commands for experimentation and exploration within Jupyter Notebooks.", 'The capability to display Pandas data frames directly within Jupyter Notebooks enables the visualization of complex data in a readable format, enhancing the effectiveness of data analysis.']}], 'duration': 412.282, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HW29067qVWk/pics/HW29067qVWk1009313.jpg', 'highlights': ['The capability to display Pandas data frames directly within Jupyter Notebooks enables the visualization of complex data in a readable format, enhancing the effectiveness of data analysis.', "The 'timeit' magic command allows easy addition of code timing functionality, providing the average time taken to execute code and aiding in comparing the execution time of different functions.", 'The matplotlib inline command allows matplotlib charts to be displayed within the notebook, enhancing visualization capabilities.', 'The ability to display plots and render HTML directly within Jupyter Notebooks enhances real-time data exploration without rerunning the entire script.', 'Running normal commands within the notebook, such as ls-la, provides similar functionality to running bash commands in a terminal, enabling file listing and user permission display.', "The 'ls' magic command provides a list of available magic commands for experimentation and exploration within Jupyter Notebooks."]}, {'end': 1809.76, 'segs': [{'end': 1477.051, 'src': 'embed', 'start': 1444.255, 'weight': 0, 'content': [{'end': 1446.337, 'text': 'We could download this as a Python file.', 'start': 1444.255, 'duration': 2.082}, {'end': 1450.742, 'text': "I want to choose HTML, so I'll download that as an HTML.", 'start': 1447.239, 'duration': 3.503}, {'end': 1457.007, 'text': 'and if I open up that file I just downloaded, then you can see that we have an HTML version of this.', 'start': 1451.383, 'duration': 5.624}, {'end': 1458.367, 'text': 'Now these cells here.', 'start': 1457.067, 'duration': 1.3}, {'end': 1466.413, 'text': "I can't edit these, since now it's HTML, but I could post this in a blog or something like that, and you can see that it's nice and readable,", 'start': 1458.367, 'duration': 8.046}, {'end': 1468.454, 'text': 'has all of our code and all of the output.', 'start': 1466.413, 'duration': 2.041}, {'end': 1477.051, 'text': 'Now, if you actually wanted to share this notebook file with somebody, then what is actually in these notebook files?', 'start': 1469.144, 'duration': 7.907}], 'summary': 'Transcript discusses downloading python file as html, making it readable for sharing.', 'duration': 32.796, 'max_score': 1444.255, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HW29067qVWk/pics/HW29067qVWk1444255.jpg'}, {'end': 1636.374, 'src': 'embed', 'start': 1611.369, 'weight': 2, 'content': [{'end': 1619.651, 'text': 'If you do a Google search for Jupiter galleries, one of the top results is this IPython GitHub page.', 'start': 1611.369, 'duration': 8.282}, {'end': 1628.533, 'text': 'Now there are also newer Jupyter notebooks on here also, but they had made this page before the name change, so it still says IPython here.', 'start': 1620.091, 'duration': 8.442}, {'end': 1636.374, 'text': 'But if you go to this page, then there are a lot of examples of notebooks that you can actually download directly and play around with.', 'start': 1629.213, 'duration': 7.161}], 'summary': 'The ipython github page has numerous jupiter notebooks available for download.', 'duration': 25.005, 'max_score': 1611.369, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HW29067qVWk/pics/HW29067qVWk1611369.jpg'}, {'end': 1781.061, 'src': 'embed', 'start': 1753.018, 'weight': 1, 'content': [{'end': 1756.8, 'text': 'I hope this gave you all an idea for how you can begin using these Jupyter notebooks.', 'start': 1753.018, 'duration': 3.782}, {'end': 1758.801, 'text': "They're really becoming popular.", 'start': 1757.58, 'duration': 1.221}, {'end': 1762.964, 'text': "It's a great way to explore your data and your code in an interactive way.", 'start': 1759.061, 'duration': 3.903}, {'end': 1769.188, 'text': "It's great for displaying plots and charts and pandas data frames and all kinds of different things.", 'start': 1763.564, 'duration': 5.624}, {'end': 1772.712, 'text': "And it's also something that's already being used in real research.", 'start': 1769.768, 'duration': 2.944}, {'end': 1781.061, 'text': 'So for example, we saw the LIGO notebook at the beginning of this video, which showed some of their gravitational wave research and notebook form.', 'start': 1772.792, 'duration': 8.269}], 'summary': "Jupyter notebooks are popular for interactive data and code exploration, and are used in real research, such as ligo's gravitational wave research.", 'duration': 28.043, 'max_score': 1753.018, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HW29067qVWk/pics/HW29067qVWk1753018.jpg'}], 'start': 1422.116, 'title': 'Exporting ipython notebooks and python kernels', 'summary': 'Discusses exporting ipython notebooks in various formats, including html, python file, and json structure. it also highlights the process of installing multiple python kernels in jupyter notebooks and the convenience of using anaconda installation for creating python 2 kernel.', 'chapters': [{'end': 1511.063, 'start': 1422.116, 'title': 'Exporting ipython notebooks and file structure', 'summary': 'Discusses exporting ipython notebooks in various formats including html, python file, and the underlying json structure, enabling easy sharing and publishing of code and output, while demonstrating how to do so within the ipython interface and a text editor.', 'duration': 88.947, 'highlights': ['IPython notebooks can be exported in different formats such as HTML, Python file, and they are structured as JSON files, facilitating sharing and publishing of code and output.', 'Exporting notebooks as HTML allows for easy integration with blogs and provides a readable format with code and output.', 'The underlying file structure of IPython notebooks is essentially a JSON file containing all the necessary information.']}, {'end': 1809.76, 'start': 1511.704, 'title': 'Jupyter notebooks and python kernels', 'summary': 'Highlights the process of installing multiple python kernels in jupyter notebooks, the convenience of using anaconda installation for creating python 2 kernel, and the availability of online resources for practicing with jupyter notebooks.', 'duration': 298.056, 'highlights': ['The convenience of using Anaconda installation for creating Python 2 kernel Anaconda installation provides the convenience of setting up Conda virtual environments, allowing Jupyter installation within those virtual environments to create Python 2 kernels.', 'Process of installing multiple Python kernels in Jupyter notebooks Explains the process of installing Python 2 kernel either through Anaconda installation or via pip installation instructions from the website.', 'Availability of online resources for practicing with Jupyter notebooks Mentions the availability of examples and tutorials online, such as the IPython GitHub page, where users can find and download numerous sample notebooks for practice and exploration.']}], 'duration': 387.644, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HW29067qVWk/pics/HW29067qVWk1422116.jpg', 'highlights': ['IPython notebooks can be exported in different formats such as HTML, Python file, and they are structured as JSON files, facilitating sharing and publishing of code and output.', 'Exporting notebooks as HTML allows for easy integration with blogs and provides a readable format with code and output.', 'The underlying file structure of IPython notebooks is essentially a JSON file containing all the necessary information.', 'The convenience of using Anaconda installation for creating Python 2 kernel Anaconda installation provides the convenience of setting up Conda virtual environments, allowing Jupyter installation within those virtual environments to create Python 2 kernels.', 'Process of installing multiple Python kernels in Jupyter notebooks Explains the process of installing Python 2 kernel either through Anaconda installation or via pip installation instructions from the website.', 'Availability of online resources for practicing with Jupyter notebooks Mentions the availability of examples and tutorials online, such as the IPython GitHub page, where users can find and download numerous sample notebooks for practice and exploration.']}], 'highlights': ["Jupyter Notebooks allow interactive code running in a web browser, alongside visualizations and markdown text, making it a powerful tool for explaining processes (e.g., LIGO's use for replicating research results).", 'LIGO, the observatory that detected gravitational waves in late 2015, utilized Jupyter Notebooks to publish research in notebook form, enabling replication of processing using their own data.', 'Jupyter project evolved from IPython, consolidating its features and capabilities, making it a versatile tool for running code interactively.', 'The interactive nature of Jupyter Notebooks allows users to display Markdown code, Python code, and interactive charts, enabling them to modify and rerun cells for different results, making it a popular choice for data visualization and analysis.', 'The visualizations produced in Jupyter Notebooks are not static, but are generated in the browser by the code, allowing users to interact with the data and code, making it a powerful tool for data exploration and analysis.', 'The layout of Jupyter Notebooks resembles a blog post or textbook, providing a structured and organized format for presenting code, explanations, and visualizations, contributing to its popularity for data analysis and communication.', "The ability to modify and rerun code cells in Jupyter Notebooks allows for interactive data exploration and visualization, enhancing the user's understanding and analysis of the data, contributing to the widespread adoption of this tool.", 'Anaconda Python distribution is recommended for installing Jupyter, as it comes bundled with Jupyter installation The Anaconda Python distribution is recommended for installing Jupyter as it comes bundled with the Jupyter installation, providing ease and convenience.', 'Starting a new notebook requires selecting a kernel, which determines the programming language to be used, such as Python 3 Starting a new notebook requires selecting a kernel, which determines the programming language to be used. In the demonstration, the Python 3 kernel is selected for creating a new notebook.', 'User Interface Tour and Keyboard Shortcuts in the Help menu provide guidance for navigating Jupyter Notebook The User Interface Tour and Keyboard Shortcuts in the Help menu provide guidance for navigating the Jupyter Notebook, offering information on layout, icons and mode indicators, as well as a comprehensive list of keyboard shortcuts for command and edit mode.', 'Jupyter Notebook server must be kept running to access notebooks within localhost The Jupyter Notebook server must be kept running to access notebooks within localhost, ensuring continuous access to the notebooks created.', "The 'Run All' option in the cell menu enables executing all cells from top to bottom, ensuring expected variable values and sequential execution.", 'The numbers beside the cells indicate the order of execution, allowing flexibility in running cells in a non-linear manner.', 'The cells in Jupyter Notebooks behave like an interactive prompt, allowing code execution without explicitly using print statements.', 'Jupyter Notebooks provide the flexibility to execute all cells above or below the current cell, allowing efficient re-execution of specific sections of code.', 'The capability to display Pandas data frames directly within Jupyter Notebooks enables the visualization of complex data in a readable format, enhancing the effectiveness of data analysis.', "The 'timeit' magic command allows easy addition of code timing functionality, providing the average time taken to execute code and aiding in comparing the execution time of different functions.", 'The matplotlib inline command allows matplotlib charts to be displayed within the notebook, enhancing visualization capabilities.', 'The ability to display plots and render HTML directly within Jupyter Notebooks enhances real-time data exploration without rerunning the entire script.', 'Running normal commands within the notebook, such as ls-la, provides similar functionality to running bash commands in a terminal, enabling file listing and user permission display.', "The 'ls' magic command provides a list of available magic commands for experimentation and exploration within Jupyter Notebooks.", 'IPython notebooks can be exported in different formats such as HTML, Python file, and they are structured as JSON files, facilitating sharing and publishing of code and output.', 'Exporting notebooks as HTML allows for easy integration with blogs and provides a readable format with code and output.', 'The underlying file structure of IPython notebooks is essentially a JSON file containing all the necessary information.', 'The convenience of using Anaconda installation for creating Python 2 kernel Anaconda installation provides the convenience of setting up Conda virtual environments, allowing Jupyter installation within those virtual environments to create Python 2 kernels.', 'Process of installing multiple Python kernels in Jupyter notebooks Explains the process of installing Python 2 kernel either through Anaconda installation or via pip installation instructions from the website.', 'Availability of online resources for practicing with Jupyter notebooks Mentions the availability of examples and tutorials online, such as the IPython GitHub page, where users can find and download numerous sample notebooks for practice and exploration.']}