title: TypeError converting a Pandas Dataframe to Spark Dataframe in Pyspark
body: <p>Did my research, but didn't find anything on this. I want to convert a simple <code>pandas.DataFrame</code> to a spark dataframe, like this:</p>
  
  <pre><code>df = pd.DataFrame({'col1': ['a', 'b', 'c'], 'col2': [1, 2, 3]})
  sc_sql.createDataFrame(df, schema=df.columns.tolist()) 
  </code></pre>
  
  <p>The error I get is:</p>
  
  <pre><code>TypeError: Can not infer schema for type: &lt;class 'str'&gt;
  </code></pre>
  
  <p>I tried something even simpler:</p>
  
  <pre><code>df = pd.DataFrame([1, 2, 3])
  sc_sql.createDataFrame(df)
  </code></pre>
  
  <p>And I get:</p>
  
  <pre><code>TypeError: Can not infer schema for type: &lt;class 'numpy.int64'&gt;
  </code></pre>
  
  <p>Any help? Do manually need to specify a schema or so?</p>
  
  <p><code>sc_sql</code> is a <code>pyspark.sql.SQLContext</code>, I am in a jupyter notebook on python 3.4 and spark 1.6.</p>
  
  <p>Thanks!</p>