pyspark.sql module — PySpark 2.2.0 documentation
spark.apache.org › api › pythonpyspark.sql.SparkSession Main entry point for DataFrame and SQL functionality. pyspark.sql.DataFrame A distributed collection of data grouped into named columns. pyspark.sql.Column A column expression in a DataFrame. pyspark.sql.Row A row of data in a DataFrame. pyspark.sql.GroupedData Aggregation methods, returned by DataFrame.groupBy().
pyspark.sql.functions — PySpark 3.2.0 documentation
spark.apache.org › pyspark › sqlThis is equivalent to the LAG function in SQL. .. versionadded:: 1.4.0 Parameters ---------- col : :class:`~pyspark.sql.Column` or str name of column or expression offset : int, optional number of row to extend default : optional default value """ sc = SparkContext._active_spark_context return Column(sc._jvm.functions.lag(_to_java_column(col ...
pyspark.sql module — PySpark 2.4.0 documentation
spark.apache.org › api › pythonThe user-defined function can be either row-at-a-time or vectorized. See pyspark.sql.functions.udf() and pyspark.sql.functions.pandas_udf(). returnType – the return type of the registered user-defined function. The value can be either a pyspark.sql.types.DataType object or a DDL-formatted type string. Returns: a user-defined function.