2 Installing Anaconda and Jupyter Notebook Flashcards
What is Anaconda?
A comprehensive suite of tools and packages for data science and machine learning, bundling various Python libraries.
Anaconda simplifies package management and deployment.
What is Jupyter Notebook?
A component of Anaconda used for writing and running Python code, data analysis, and creating documentation in an interactive format.
Jupyter Notebooks support live code, equations, visualizations, and narrative text.
How do you install Jupyter Notebook?
Through Anaconda.
After installation, it opens in a web browser with a file explorer.
What are the two types of cells in Jupyter Notebook?
- Code Cells
- Markdown Cells
Code Cells execute Python code; Markdown Cells are used for formatted text.
What happens when you press Shift + Enter in Jupyter Notebook?
Runs the current cell’s code and advances to the next cell automatically.
This is a common shortcut for executing code in Jupyter.
What is the purpose of the execution count in Jupyter Notebook?
Indicates how many times a cell has been run.
This helps track the order of execution and debugging.
What are the benefits of using Jupyter Notebook?
- Easy-to-use
- Interactive environment
- Suitable for beginners and advanced users
- Ideal for quick prototyping and data visualization
It is also widely used in education and training.
How does Jupyter Notebook compare to PyCharm?
Jupyter Notebook is praised for its simplicity and interactive coding style, while PyCharm has more robust features.
PyCharm is often used in professional settings.
Where are files saved in Jupyter Notebook?
In the folder where Jupyter Notebook was started.
Users can rename notebooks within the interface for better organization.
What are Conda environments?
Isolated spaces for different projects or Python versions to manage dependencies and avoid conflicts among libraries.
This is a key feature for maintaining clean project setups.
How can packages be managed with conda
?
- Install packages
- Update packages
- Remove packages
Example commands include conda install numpy
and conda update pandas
.
How can Jupyter Notebook be launched from the command line?
By typing jupyter notebook
in a terminal or command prompt.
This starts Jupyter in the directory from which the command is run.
What is JupyterLab?
A more modern interface that integrates notebooks, text editors, terminals, and more in one workspace.
JupyterLab offers enhanced user interface features compared to the classic Jupyter Notebook.
What are magic commands in Jupyter?
Special commands like %matplotlib inline
and %timeit
that streamline tasks within the notebook environment.
Magic commands enhance functionality without leaving the notebook.
How can notebooks be exported?
To various formats like HTML, PDF, or Python scripts.
This is useful for sharing results or creating static reports.
What are the version control considerations for Jupyter Notebooks?
Notebooks may pose challenges for version control due to merge issues; using Python scripts can be preferable.
Tools like nbdime
help compare and merge notebook files.
What is a security consideration when using Jupyter Notebooks?
Be cautious with sensitive data or credentials; use environment variables or secure storage solutions.
Avoid storing passwords in plain text within notebooks.
What are some keyboard shortcuts in Jupyter Notebook?
- A: Insert cell Above
- B: Insert cell Below
- M: Convert cell to Markdown
- Y: Convert cell to Code
Learning shortcuts can significantly speed up workflow.
What is real-time collaboration in Jupyter Notebooks?
Tools like Google Colab or JupyterHub allow multiple users to collaborate in real-time.
This feature is beneficial for team projects or educational settings.