converting pandas dataframes to spark dataframe in zeppelin

后端 未结 3 1903
南旧
南旧 2021-02-04 05:16

I am new to zeppelin. I have a usecase wherein i have a pandas dataframe.I need to visualize the collections using in-built chart of zeppelin I do not have a clear approach here

3条回答
  •  深忆病人
    2021-02-04 05:46

    The following works for me with Zeppelin 0.6.0, Spark 1.6.2 and Python 3.5.2:

    %pyspark
    import pandas as pd
    df = pd.DataFrame([("foo", 1), ("bar", 2)], columns=("k", "v"))
    z.show(sqlContext.createDataFrame(df))
    

    which renders as:

    enter image description here

提交回复
热议问题