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
DataFrameDataFrame
numRows
intnumber of rows to show
truncate
intif set to more than 0, truncates strings to
truncate
characters and all cells will be aligned rightvertical
boolIf 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|
+-----+