Funny thing happened actually. I had tried same way as above but removed additional content for simplicity. I made the mistake of naming my variable as str (Duhh). This then overrode the standard str() function and because of that whatever I tried failed.
After restarting the interpreter it all worked fine. Thanks for your help. -Nikhil On Wed, Jun 21, 2017 at 1:22 PM, Jeff Zhang <zjf...@gmail.com> wrote: > > This is not zeppelin issue, it is due to your python code, use following > code > > str="Col1\tCol2" > print("%table " + str) > > > > Nikhil Utane <nikhil.subscri...@gmail.com>于2017年6月21日周三 下午12:46写道: > >> Hi, >> >> The official documentation shows example of printing static values in a >> table. >> I have a need to print variable values inside table in pyspark. >> How to achieve that? >> >> %pyspark >> str="Col1\tCol2" >> print("%table %s" % str) >> >> ValueError: unsupported format character 't' (0x74) at index 1 >> >> -Thanks & Regards >> Nikhil >> >