Skip to content

Commit

Permalink
Add a requirement for createDataFrame with Pandas DataFrame ahead too
Browse files Browse the repository at this point in the history
  • Loading branch information
HyukjinKwon committed Feb 7, 2018
1 parent dd50411 commit b7a940d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/pyspark/sql/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,9 @@ def createDataFrame(self, data, schema=None, samplingRatio=None, verifySchema=Tr
except Exception:
has_pandas = False
if has_pandas and isinstance(data, pandas.DataFrame):
from pyspark.sql.utils import require_minimum_pandas_version
require_minimum_pandas_version()

if self.conf.get("spark.sql.execution.pandas.respectSessionTimeZone").lower() \
== "true":
timezone = self.conf.get("spark.sql.session.timeZone")
Expand Down

0 comments on commit b7a940d

Please sign in to comment.