O'Reilly logo

Effective Amazon Machine Learning by Alexis Perrier

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Inferring the deck from the cabin

The cabin variable has three character values, where the first character corresponds to the Deck number (A, B, C, D, E). This is surely important information that we would like to extract.  We can do so with the following query:

SELECT cabin, substr(cabin, 1, 1) as deck  FROM titanic;

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required