Daily Reading 10
Data Analysis
What are the key features and benefits of Jupyter Lab, and how does it differ from Jupyter Notebook?
Jupyter lab is a program that allows you to open, position, and work on numerous files of varying formats at once, with scaling and positioning handled on a modular basis, with capability to be extended to supporting new formats by community contributions. Closer to a desktop interface, but for only the things you are currently working on.
Jupyter Notebook is a text and code editor that also takes a modular approach, but for a vertically aligned set of text/code blocks. You can create sections called “cells” that have differing formatting, and the ability to copy paste and move these cells independently in post, allowing you to work in a language, and in markdown at once, in a single document.
What are the main functionalities provided by the NumPy library, and how can it be useful in Python programming, particularly for scientific computing and data manipulation tasks?
NumPy allows you to view list of lists, or .csv files as multi dimensional arrays, and provides various methods to modify or control the data provided through python. NumPy automatically handling the conversion and formatting allows you to then treat it as a multi dimensional matrix, rendering you able to modify or view specific rows, columns, or cells. Math functions, data type conversion, and matrix-wide comparisons are all possible, making it very useful for performing actions on large scales of data.
Explain the basic structure and properties of NumPy arrays, and provide examples of how to create, manipulate, and perform operations on them
NumPy arrays are at their heart, lists, or list of lists, or any depth of list of list of lists, better known as n-dimensional arrays. A 2 dimensional array would be comparable to how a game of Battleship works, where a data point is in a specific cell horizontally and vertically, but support exists for arrays that have further axes beyond 2 or 3. Importing of .csv files will produce a NumPy array, as well as manually defining one. For an example 2 dimensional NumPy array that consists of random numbers, you could extract only cells that a value over 15, you could return a new list of what cells contain negative numbers, you could convert every cell from integers to floats.