Table of Contents

Method ShowString

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

ShowString(DataFrame, int, int, bool)

Displays rows of the DataFrame in tabular form

[Since("2.4.0")]
public static string ShowString(this DataFrame dataFrame, int numRows = 20, int truncate = 20, 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

row data

Examples

Example ShowString usage for a DataFrame,


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

Results in,

+-----+
| Name|
+-----+
| John|
|Steve|
| Jess|
+-----+