Skip to Content
Practical Predictive Analytics
book

Practical Predictive Analytics

by Ralph Winters
June 2017
Beginner to intermediate content levelBeginner to intermediate
576 pages
15h 22m
English
Packt Publishing
Content preview from Practical Predictive Analytics

Displaying the contents of a Spark dataframe

There are several ways of displaying subsets of your Spark dataframe. Some of the choices are as follows:

  • showDF: This is a Spark command that displays the contents of a dataframe in a condensed manner.
  • head: This is the normal R function that can be used on a Spark dataframe; it follows the same syntax as base R.
  • take: This command also prints some rows, but collects the rows from the underlying RDD.
  • display: This is a special databricks command that is roughly equivalent to the base R View command, but also allows you to plot a subset of the output via control icons below the horizontal scroll bar below the data. Using display also allows you to switch to graphing mode.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Data Superstream: Analytics Engineering

Data Superstream: Analytics Engineering

Alistair Croll, Anna Filippova, Emilie Schario, Lewis Davies, Jacob Frackson, Benn Stancil, Nick Acosta, Elizabeth Caley
R: Predictive Analysis

R: Predictive Analysis

Tony Fischetti, Eric Mayor, Rui Miguel Forte
Python: Advanced Predictive Analytics

Python: Advanced Predictive Analytics

Ashish Kumar, Joseph Babcock

Publisher Resources

ISBN: 9781785886188Supplemental Content