Learn about sequence collection types and operations on them.
- [Instructor] Let's talk about Scala maps.…Maps are Scala collections…used for groups of key value pairs.…Let's start by creating a collection of country names…and country capital cities…so we'll create a val called capitals…and I would like to create a map…and I would like to list some countries and their capitals.…We'll start with Argentina…and the capital is Buenos Aires.…
We'll add Canada…and its capital Ottawa.…And Egypt…and its capital Cairo.…Liberia…and the capital of Liberia is Monrovia.…And the Netherlands…and the capital there is Amsterdam.…
And we'll conclude with the United States…and its capital Washington D.C.…Now, maps are collections of keys and values.…So to get the list of keys from a map,…we can specify the name of the value or variable capitals…followed by the keys method.…So let's clear the screen.…Now let's do some operations on capitals.…Maps are collections of keys and values.…
To get the list of keys from a map,…we can specify capitals.keys…and that returns a list of all the keys.…Similarly, we can say capitals.values…
Dan also focuses on using Scala with Spark, a distributed processing platform. He first describes how to work with Resilient Distributed Datasets (RDDs)—a fundamental Spark data structure—and then explains how to use Scala with Spark DataFrames, a new class of data structure specially designed for analytic processing. He wraps up the course by providing a summary of advantages of using Scala for data science.
- The advantages of Scala for data science
- Scala data types
- Scala arrays, vectors, and ranges
- Parallel processing in Scala
- Mapping functions over parallel collections
- When and when not to use parallel collections
- Using SQL in Scala
- Scala and Spark RDDs
- Scala and Spark DataFrames
- Creating DataFrames
Skill Level Intermediate
Java for Data Scientists Essential Trainingwith Charles Kelly2h 43m Intermediate
1. Introduction to Scala
2. Parallel Processing in Scala
3. Using SQL in Scala
4. Scala and Spark RDDs
5. Scala and Spark DataFrames
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.