def _inferSchemaFromList(self, data):
    '\n        Infer schema from list of Row or tuple.\n\n        :param data: list of Row or tuple\n        :return: :class:`pyspark.sql.types.StructType`\n        '
    if (not data):
        raise ValueError('can not infer schema from empty dataset')
    first = data[0]
    if (type(first) is dict):
        warnings.warn('inferring schema from dict is deprecated,please use pyspark.sql.Row instead')
    schema = reduce(_merge_type, map(_infer_schema, data))
    if _has_nulltype(schema):
        raise ValueError('Some of types cannot be determined after inferring')
    return schema
Infer schema from list of Row or tuple.

:param data: list of Row or tuple
:return: :class:`pyspark.sql.types.StructType`
def _inferSchemaFromList(self, data):
    '\n        Infer schema from list of Row or tuple.\n\n        :param data: list of Row or tuple\n        :return: :class:`pyspark.sql.types.StructType`\n        '
    if (not data):
        raise ValueError('can not infer schema from empty dataset')
    first = data[0]
    if (type(first) is dict):
        warnings.warn('inferring schema from dict is deprecated,please use pyspark.sql.Row instead')
    schema = reduce(_merge_type, map(_infer_schema, data))
    if _has_nulltype(schema):
        raise ValueError('Some of types cannot be determined after inferring')
    return schema