mstill3 commented on a change in pull request #26299: Fix typo in example
documentation
URL: https://github.com/apache/spark/pull/26299#discussion_r340739262
##########
File path: python/pyspark/sql/session.py
##########
@@ -624,20 +624,20 @@ def createDataFrame(self, data, schema=None,
samplingRatio=None, verifySchema=Tr
will be inferred from ``data``.
When ``schema`` is ``None``, it will try to infer the schema (column
names and types)
- from ``data``, which should be an RDD of :class:`Row`,
- or :class:`namedtuple`, or :class:`dict`.
+ from ``data``, which should be an RDD of either :class:`Row`,
+ :class:`namedtuple`, or :class:`dict`.
When ``schema`` is :class:`pyspark.sql.types.DataType` or a datatype
string, it must match
the real data, or an exception will be thrown at runtime. If the given
schema is not
:class:`pyspark.sql.types.StructType`, it will be wrapped into a
- :class:`pyspark.sql.types.StructType` as its only field, and the field
name will be "value",
- each record will also be wrapped into a tuple, which can be converted
to row later.
+ :class:`pyspark.sql.types.StructType` as its only field, and the field
name will be "value".
+ Each record will also be wrapped into a tuple, which can be converted
to row later.
If schema inference is needed, ``samplingRatio`` is used to determined
the ratio of
rows used for schema inference. The first row will be used if
``samplingRatio`` is ``None``.
:param data: an RDD of any kind of SQL data representation(e.g. row,
tuple, int, boolean,
Review comment:
okay can do!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]