Table of Contents

Method Debug

Namespace
SparkTest.NET.Extensions
Assembly
SparkTest.NET.dll

Debug(DataFrame, int, int, bool)

Debugs a provided DataFrame

[Since("2.4.0")]
public static string Debug(this DataFrame dataFrame, int numRows = 20, int truncate = 0, bool vertical = false)

Parameters

dataFrame DataFrame

DataFrame

numRows int

number of rows to show

truncate int

if set to more than 0, truncates strings to truncate characters and all cells will be aligned right

vertical bool

If set to true, prints output rows vertically (one line per column value)

Returns

string

DataFrame details

Examples

Example Debug usage for a DataFrame,


var df = s.CreateDataFrameFromData(
    new { Name = "John" },
    new { Name = "Steve" },
    new { Name = "Jess" }
);
var debugResult = df.Debug();

Results in,

root
 |-- Name: string (nullable = true)


(top = 20)
+-----+
|Name |
+-----+
|John |
|Steve|
|Jess |
+-----+