In chapters 2 and 3, you learned basic elements of the Julia language. We have mostly used scalar types (like numbers) in all the examples. However, in data science, you will typically work with data collections, groupings of a variable number of data items. One collection type already introduced in chapter 2 is a vector.
In this chapter, you will learn how to use several fundamental collections that are most used in practical scenarios: arrays, dictionaries, tuples, and named tuples.
In this section, you will learn the basics of working with arrays in Julia: their creation, indexing into arrays, and the most common operations you can expect to perform with them. Arrays are commonly used collections in data science. Most machine learning algorithms expect data stored in arrays as their inputs. In Julia (as opposed to, for example, Python), arrays are part of the language specification, so they are equipped with a convenient syntax. Working with them requires learning only one set of rules, and they are fast.