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
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
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 |
+-----+