Kevin’s solution works.  Just minor correction, Python boolean should be 
capitalized.  
That is
df.show(10, False)

> On Jan 27, 2016, at 12:34 PM, Kevin Mellott <kevin.r.mell...@gmail.com> wrote:
> 
> I believe that show should work if you provide it with both the number of 
> rows and the truncate flag.
> 
> ex: df.show(10, false)
> 
> http://spark.apache.org/docs/1.5.0/api/python/pyspark.sql.html#pyspark.sql.DataFrame.show
>  
> <http://spark.apache.org/docs/1.5.0/api/python/pyspark.sql.html#pyspark.sql.DataFrame.show>
>  
> 
> On Wed, Jan 27, 2016 at 2:39 AM, Akhil Das <ak...@sigmoidanalytics.com 
> <mailto:ak...@sigmoidanalytics.com>> wrote:
> Why would you want to print all rows? You can try the following:
> 
> sqlContext.sql("select day_time from my_table limit 
> 10").collect().foreach(println)
> 
> 
> Thanks
> Best Regards
> 
> On Sun, Jan 24, 2016 at 5:58 PM, Eli Super <eli.su...@gmail.com 
> <mailto:eli.su...@gmail.com>> wrote:
> Unfortunately still getting error when use .show() with `false` or `False` or 
> `FALSE` 
> 
> 
> Py4JError: An error occurred while calling o153.showString. Trace:
> py4j.Py4JException: Method showString([class java.lang.String, class 
> java.lang.Boolean]) does not exist
>       at py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:333)
>       at py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:342)
>       at py4j.Gateway.invoke(Gateway.java:252)
>       at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:133)
>       at py4j.commands.CallCommand.execute(CallCommand.java:79)
>       at py4j.GatewayConnection.run(GatewayConnection.java:207)
>       at java.lang.Thread.run(Thread.java:745)
> 
> On Thu, Jan 21, 2016 at 4:54 PM, Spencer, Alex (Santander) 
> <alex.spen...@santander.co.uk <mailto:alex.spen...@santander.co.uk>> wrote:
> I forgot to add this is (I think) from 1.5.0.
> 
>  
> 
> And yeah that looks like a Python – I’m not hot with Python but it may be 
> capitalised as False or FALSE?
> 
>  
> 
>  
> 
> From: Eli Super [mailto:eli.su...@gmail.com <mailto:eli.su...@gmail.com>] 
> Sent: 21 January 2016 14:48
> To: Spencer, Alex (Santander)
> Cc: user@spark.apache.org <mailto:user@spark.apache.org>
> Subject: Re: Spark SQL . How to enlarge output rows ?
> 
>  
> 
> Thanks Alex
> 
>  
> 
> I get NameError
> 
> NameError: name 'false' is not defined
> Is it because of PySpark ?
>  
>  
> 
> On Thu, Jan 14, 2016 at 3:34 PM, Spencer, Alex (Santander) 
> <alex.spen...@santander.co.uk <mailto:alex.spen...@santander.co.uk>> wrote:
> 
> Hi,
> 
>  
> 
> Try …..show(false)
> 
>  
> 
> public void show(int numRows,
> 
>         boolean truncate)
> 
>  
> 
>  
> 
> Kind Regards,
> 
> Alex.
> 
>  
> 
> From: Eli Super [mailto:eli.su...@gmail.com <mailto:eli.su...@gmail.com>] 
> Sent: 14 January 2016 13:09
> To: user@spark.apache.org <mailto:user@spark.apache.org>
> Subject: Spark SQL . How to enlarge output rows ?
> 
>  
> 
>  
> 
> Hi
> 
>  
> 
> After executing sql 
> 
>  
> 
> sqlContext.sql("select day_time from my_table limit 10").show()
> 
>  
> 
> my output looks like  :
> 
> +--------------------+
> |          day_time|
> +--------------------+
> |2015/12/15 15:52:...|
> |2015/12/15 15:53:...|
> |2015/12/15 15:52:...|
> |2015/12/15 15:52:...|
> |2015/12/15 15:52:...|
> |2015/12/15 15:52:...|
> |2015/12/15 15:51:...|
> |2015/12/15 15:52:...|
> |2015/12/15 15:52:...|
> |2015/12/15 15:53:...|
> +--------------------+
>  
> I'd like to get full rows 
> Thanks !
> Emails aren't always secure, and they may be intercepted or changed after
> they've been sent. Santander doesn't accept liability if this happens. If you
> think someone may have interfered with this email, please get in touch with 
> the
> sender another way. This message doesn't create or change any contract.
> Santander doesn't accept responsibility for damage caused by any viruses
> contained in this email or its attachments. Emails may be monitored. If you've
> received this email by mistake, please let the sender know at once that it's
> gone to the wrong person and then destroy it without copying, using, or 
> telling
> anyone about its contents.
> Santander UK plc Reg. No. 2294747 and Abbey National Treasury Services plc 
> Reg.
> No. 2338548 Registered Offices: 2 Triton Square, Regent's Place, London NW1 
> 3AN.
> Registered in England. www.santander.co.uk <http://www.santander.co.uk/>. 
> Authorised by the Prudential
> Regulation Authority and regulated by the Financial Conduct Authority and the
> Prudential Regulation Authority. FCA Reg. No. 106054 and 146003 respectively.
> Santander Sharedealing is a trading name of Abbey Stockbrokers Limited Reg. 
> No.
> 02666793. Registered Office: Kingfisher House, Radford Way, Billericay, Essex
> CM12 0GZ. Authorised and regulated by the Financial Conduct Authority. FCA 
> Reg.
> No. 154210. You can check this on the Financial Services Register by visiting
> the FCA’s website www.fca.org.uk/register <http://www.fca.org.uk/register> or 
> by contacting the FCA on 0800 111
> 6768. Santander UK plc is also licensed by the Financial Supervision 
> Commission
> of the Isle of Man for its branch in the Isle of Man. Deposits held with the
> Isle of Man branch are covered by the Isle of Man Depositors’ Compensation
> Scheme as set out in the Isle of Man Depositors’ Compensation Scheme 
> Regulations
> 2010. In the Isle of Man, Santander UK plc’s principal place of business is at
> 19/21 Prospect Hill, Douglas, Isle of Man, IM1 1ET. Santander and the flame 
> logo
> are registered trademarks.
> Santander Asset Finance plc. Reg. No. 1533123. Registered Office: 2 Triton
> Square, Regent’s Place, London NW1 3AN. Registered in England. Santander
> Corporate & Commercial is a brand name used by Santander UK plc, Abbey 
> National
> Treasury Services plc and Santander Asset Finance plc.
> Ref:[PDB#1-4A]
> 
>  
> 
> 
> 
> 

Reply via email to