class_docstr: Min-in for the conversion from pandas to Spark. Currently, only :class:`SparkSession`
  can use this class.
code: def createDataFrame(  # type: ignore[misc]
      self,
      data: "PandasDataFrameLike",
      schema: Optional[Union[StructType, List[str]]] = None,
      samplingRatio: Optional[float] = None,
      verifySchema: bool = True,
  ) -> "DataFrame":
      from pyspark.sql import SparkSession
  
      assert isinstance(self, SparkSession)
  
      from pyspark.sql.pandas.utils import (
          require_minimum_pandas_version,
      )
  
      require_minimum_pandas_version()
  
      timezone = self._jconf.sessionLocalTimeZone()
  
      # If no schema supplied by user then get the names of columns only
      if schema is None:
          schema = [
              str(x) if not isinstance(x, str) else x
              for x in data.columns
          ]
  
      if self._jconf.arrowPySparkEnabled() and len(data) > 0:
          try:
              return self._create_from_pandas_with_arrow(
                  data, schema, timezone
              )
          except Exception as e:
              if self._jconf.arrowPySparkFallbackEnabled():
                  msg = (
                      "createDataFrame attempted Arrow optimization because "
                      "'spark.sql.execution.arrow.pyspark.enabled' is set to true; however, "
                      "failed by the reason below:\n  %s\n"
                      "Attempting non-optimization as "
                      "'spark.sql.execution.arrow.pyspark.fallback.enabled' is set to "
                      "true." % str(e)
                  )
                  warn(msg)
              else:
                  msg = (
                      "createDataFrame attempted Arrow optimization because "
                      "'spark.sql.execution.arrow.pyspark.enabled' is set to true, but has "
                      "reached the error below and will not continue because automatic "
                      "fallback with 'spark.sql.execution.arrow.pyspark.fallback.enabled' "
                      "has been set to false.\n  %s" % str(e)
                  )
                  warn(msg)
                  raise
      converted_data = self._convert_from_pandas(data, schema, timezone)
      return self._create_dataframe(
          converted_data, schema, samplingRatio, verifySchema
      )
  
imports: import sys
  from typing import Any, Callable, List, Optional, Union, no_type_check, overload, TYPE_CHECKING
  from warnings import warn
  from pyspark.errors.exceptions.captured import unwrap_spark_exception
  from pyspark.loose_version import LooseVersion
  from pyspark.rdd import _load_from_socket
  from pyspark.sql.pandas.serializers import ArrowCollectSerializer
  from pyspark.sql.pandas.types import _dedup_names
  from pyspark.sql.types import ArrayType, MapType, TimestampType, StructType, DataType, _create_row
  from pyspark.sql.utils import is_timestamp_ntz_preferred
  from pyspark.traceback_utils import SCCallSiteSync
  from pyspark.errors import PySparkTypeError
label_desc: Use image node_id 3 for calling the SparkConversionMixin obj's underlying member method code with example usage: obj.createDataFrame(data, schema, samplingRatio, verifySchema) and returns: self, self