How to show full column content in a Spark Dataframe?

前端 未结 14 2138
萌比男神i
萌比男神i 2020-12-07 07:46

I am using spark-csv to load data into a DataFrame. I want to do a simple query and display the content:

val df = sqlContext.read.format(\"com.databricks.spa         


        
相关标签:
14条回答
  • 2020-12-07 08:41

    Try this in scala:

    df.show(df.count.toInt, false)
    

    The show method accepts an integer and a Boolean value but df.count returns Long...so type casting is required

    0 讨论(0)
  • 2020-12-07 08:42

    I use the plugin Chrome extension works pretty well:

    [https://userstyles.org/styles/157357/jupyter-notebook-wide][1]

    0 讨论(0)
提交回复
热议问题