I am trying to display or show()/to_html my dataframes inside an ipython notebook but it is throwing error "AttributeError". Only display(df1) is printing df schema as below:
DataFrame[name: string, age: bigint]
Here is my code:
from IPython.display import display, HTML
data = [('Alice',1),('Bob',2)]
df1 = sqlContext.createDataFrame(data, ['name','age'])
sqlContext.registerDataFrameAsTable(df1, "df1_table")
df2 = sqlContext.sql("Select * from df1_table")
#display(df1)
HTML(df1.to_html)
df1.to_html()
any ideas?