Skip to content

Commit 6ef9fdd

Browse files
Patrick NicholsonPatrick Nicholson
authored andcommitted
pep8 style changes
1 parent c9a6348 commit 6ef9fdd

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

python/pyspark/sql/context.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ def _inferSchema(self, rdd, samplingRatio=None):
245245

246246
@since(1.3)
247247
@ignore_unicode_prefix
248-
def createDataFrame(self, data, schema=None, samplingRatio=None, verifySchema=True, numSlices=None):
248+
def createDataFrame(self, data, schema=None, samplingRatio=None, verifySchema=True,
249+
numSlices=None):
249250
"""
250251
Creates a :class:`DataFrame` from an :class:`RDD`, a list or a :class:`pandas.DataFrame`.
251252
@@ -276,7 +277,7 @@ def createDataFrame(self, data, schema=None, samplingRatio=None, verifySchema=Tr
276277
We can also use ``int`` as a short name for :class:`pyspark.sql.types.IntegerType`.
277278
:param samplingRatio: the sample ratio of rows used for inferring
278279
:param verifySchema: verify data types of every row against schema.
279-
:param numSlices: specify as :class:`int` the number of slices (partitions) to distribute
280+
:param numSlices: specify as :class:`int` the number of slices (partitions) to distribute
280281
``data`` across. Applies to ``data`` of :class:`list` or :class:`pandas.DataFrame`.
281282
Defaults to `self.sparkContext.defaultParallelism`.
282283
:return: :class:`DataFrame`
@@ -337,7 +338,8 @@ def createDataFrame(self, data, schema=None, samplingRatio=None, verifySchema=Tr
337338
...
338339
Py4JJavaError: ...
339340
"""
340-
return self.sparkSession.createDataFrame(data, schema, samplingRatio, verifySchema, numSlices)
341+
return self.sparkSession.createDataFrame(data, schema, samplingRatio, verifySchema,
342+
numSlices)
341343

342344
@since(1.3)
343345
def registerDataFrameAsTable(self, df, tableName):

python/pyspark/sql/session.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,8 @@ def _createFromLocal(self, data, schema, numSlices=None):
416416

417417
@since(2.0)
418418
@ignore_unicode_prefix
419-
def createDataFrame(self, data, schema=None, samplingRatio=None, verifySchema=True, numSlices=None):
419+
def createDataFrame(self, data, schema=None, samplingRatio=None, verifySchema=True,
420+
numSlices=None):
420421
"""
421422
Creates a :class:`DataFrame` from an :class:`RDD`, a list or a :class:`pandas.DataFrame`.
422423
@@ -446,7 +447,7 @@ def createDataFrame(self, data, schema=None, samplingRatio=None, verifySchema=Tr
446447
``int`` as a short name for ``IntegerType``.
447448
:param samplingRatio: the sample ratio of rows used for inferring
448449
:param verifySchema: verify data types of every row against schema.
449-
:param numSlices: specify as :class:`int` the number of slices (partitions) to distribute
450+
:param numSlices: specify as :class:`int` the number of slices (partitions) to distribute
450451
``data`` across. Applies to ``data`` of :class:`list` or :class:`pandas.DataFrame`.
451452
Defaults to `self.sparkContext.defaultParallelism`.
452453
:return: :class:`DataFrame`

0 commit comments

Comments
 (0)