show_string
laktory.spark.dataframe.show_string
¤
FUNCTION | DESCRIPTION |
---|---|
show_string |
Returns the string generated by |
Functions¤
show_string
¤
show_string(df, n=20, truncate=True, vertical=False)
Returns the string generated by df.show()
PARAMETER | DESCRIPTION |
---|---|
n
|
Number of rows to show.
TYPE:
|
truncate
|
If set to |
vertical
|
If set to True, print output rows vertically (one line per column value).
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
str
|
Show string |
Examples:
import laktory # noqa: F401
df = spark.createDataFrame([[7, "a"], [8, "b"], [9, "c"]], ["x", "y"])
print(df.laktory.show_string())
'''
+---+---+
| x| y|
+---+---+
| 7| a|
| 8| b|
| 9| c|
+---+---+
'''
Source code in laktory/spark/dataframe/show_string.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
|