title: converting pandas dataframes to spark dataframe in zeppelin
body: <p>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. MY understanding is with zeppelin we can visualize the data if it is a RDD format. So, i wanted to convert to pandas dataframe into spark dataframe, and then do some querying (using sql), I will visualize.
  To start with, I tried to convert pandas dataframe to spark's but i failed</p>
  
  <pre><code>%pyspark
  import pandas as pd
  from pyspark.sql import SQLContext
  print sc
  df = pd.DataFrame([("foo", 1), ("bar", 2)], columns=("k", "v"))
  print type(df)
  print df
  sqlCtx = SQLContext(sc)
  sqlCtx.createDataFrame(df).show()
  </code></pre>
  
  <p>And I got the below error</p>
  
  <pre><code>Traceback (most recent call last): File "/tmp/zeppelin_pyspark.py", 
  line 162, in &lt;module&gt; eval(compiledCode) File "&lt;string&gt;", 
  line 8, in &lt;module&gt; File "/home/bala/Software/spark-1.5.0-bin-hadoop2.6/python/pyspark/sql/context.py", 
  line 406, in createDataFrame rdd, schema = self._createFromLocal(data, schema) File "/home/bala/Software/spark-1.5.0-bin-hadoop2.6/python/pyspark/sql/context.py", 
  line 322, in _createFromLocal struct = self._inferSchemaFromList(data) File "/home/bala/Software/spark-1.5.0-bin-hadoop2.6/python/pyspark/sql/context.py", 
  line 211, in _inferSchemaFromList schema = _infer_schema(first) File "/home/bala/Software/spark-1.5.0-bin-hadoop2.6/python/pyspark/sql/types.py", 
  line 829, in _infer_schema raise TypeError("Can not infer schema for type: %s" % type(row)) 
  TypeError: Can not infer schema for type: &lt;type 'str'&gt; 
  </code></pre>
  
  <p>Can someone please help me out here? Also, correct me if I am wrong anywhere. </p>