Mostar datos de tabla
Muestra los datos del dataframe
val df = Seq( ("Paco","Garcia",24,24000), ("Juan","Garcia",26,27000), ("Lola","Martin",29,31000), ("Sara","Garcia",35,34000) ).toDF("nombre", "apellido","edad","salario") df.show()
+------+--------+----+-------+ |nombre|apellido|edad|salario| +------+--------+----+-------+ | Paco| Garcia| 24| 24000| | Juan| Garcia| 26| 27000| | Lola| Martin| 29| 31000| | Sara| Garcia| 35| 34000| +------+--------+----+-------+
Mostrar resumen de datos
Muestra una tabla resumen de los datos del dataframe
df .describe() .show()
+-------+------+--------+-----------------+----------------+ |summary|nombre|apellido| edad| salario| +-------+------+--------+-----------------+----------------+ | count| 4| 4| 4| 4| | mean| null| null| 28.5| 29000.0| | stddev| null| null|4.795831523312719|4396.96865275764| | min| Juan| Garcia| 24| 24000| | max| Sara| Martin| 35| 34000| +-------+------+--------+-----------------+----------------+
0 comentarios