class_docstr: A column in a DataFrame.
  
  .. versionadded:: 1.3.0
  
  .. versionchanged:: 3.4.0
      Supports Spark Connect.
  
  Examples
  --------
  Column instances can be created by
  
  >>> df = spark.createDataFrame(
  ...      [(2, "Alice"), (5, "Bob")], ["age", "name"])
  
  Select a column out of a DataFrame
  >>> df.name
  Column<'name'>
  >>> df["name"]
  Column<'name'>
  
  Create from an expression
  
  >>> df.age + 1
  Column<...>
  >>> 1 / df.age
  Column<...>
class_docstr_tok: ["A","column","in","a","DataFrame",".","..","versionadded",":",":","1.3.0","..","versionchanged",":",":","3.4.0","Supports","Spark","Connect",".","Examples","--","--","--","--","Column","instances","can","be","created","by",">",">",">","df","=","spark.createDataFrame","(","...","[","(","2",",","``","Alice","''",")",",","(","5",",","``","Bob","''",")","]",",","[","``","age","''",",","``","name","''","]",")","Select","a","column","out","of","a","DataFrame",">",">",">","df.name","Column","<","'name","'",">",">",">",">","df","[","``","name","''","]","Column","<","'name","'",">","Create","from","an","expression",">",">",">","df.age","+","1","Column","<","...",">",">",">",">","1","\/","df.age","Column","<","...",">"]
docstr: Returns this column aliased with a new name or names (in the case of expressions that
  return more than one column, such as explode).
  
  .. versionadded:: 1.3.0
  
  .. versionchanged:: 3.4.0
      Supports Spark Connect.
  
  Parameters
  ----------
  alias : str
      desired column names (collects all positional arguments passed)
  
  Other Parameters
  ----------------
  metadata: dict
      a dict of information to be stored in ``metadata`` attribute of the
      corresponding :class:`StructField <pyspark.sql.types.StructField>` (optional, keyword
      only argument)
  
      .. versionchanged:: 2.2.0
         Added optional ``metadata`` argument.
  
  Returns
  -------
  :class:`Column`
      Column representing whether each element of Column is aliased with new name or names.
  
  Examples
  --------
  >>> df = spark.createDataFrame(
  ...      [(2, "Alice"), (5, "Bob")], ["age", "name"])
  >>> df.select(df.age.alias("age2")).collect()
  [Row(age2=2), Row(age2=5)]
  >>> df.select(df.age.alias("age3", metadata={'max': 99})).schema['age3'].metadata['max']
  99
docstr_tok: ["Returns","this","column","aliased","with","a","new","name","or","names","(","in","the","case","of","expressions","that","return","more","than","one","column",",","such","as","explode",")",".","..","versionadded",":",":","1.3.0","..","versionchanged",":",":","3.4.0","Supports","Spark","Connect",".","Parameters","--","--","--","--","--","alias",":","str","desired","column","names","(","collects","all","positional","arguments","passed",")","Other","Parameters","--","--","--","--","--","--","--","--","metadata",":","dict","a","dict","of","information","to","be","stored","in","``","metadata","``","attribute","of","the","corresponding",":","class",":","`","StructField","<","pyspark.sql.types.StructField",">","`","(","optional",",","keyword","only","argument",")","..","versionchanged",":",":","2.2.0","Added","optional","``","metadata","``","argument",".","Returns","--","--","--","-",":","class",":","`","Column","`","Column","representing","whether","each","element","of","Column","is","aliased","with","new","name","or","names",".","Examples","--","--","--","--",">",">",">","df","=","spark.createDataFrame","(","...","[","(","2",",","``","Alice","''",")",",","(","5",",","``","Bob","''",")","]",",","[","``","age","''",",","``","name","''","]",")",">",">",">","df.select","(","df.age.alias","(","``","age2","''",")",")",".collect","(",")","[","Row","(","age2=2",")",",","Row","(","age2=5",")","]",">",">",">","df.select","(","df.age.alias","(","``","age3","''",",","metadata=","{","'max","'",":","99","}",")",")",".schema","[","'age3","'","]",".metadata","[","'max","'","]","99"]
code: def alias(self, *alias: str, **kwargs: Any) -> "Column":
      """
      Returns this column aliased with a new name or names (in the case of expressions that
      return more than one column, such as explode).
  
      .. versionadded:: 1.3.0
  
      .. versionchanged:: 3.4.0
          Supports Spark Connect.
  
      Parameters
      ----------
      alias : str
          desired column names (collects all positional arguments passed)
  
      Other Parameters
      ----------------
      metadata: dict
          a dict of information to be stored in ``metadata`` attribute of the
          corresponding :class:`StructField <pyspark.sql.types.StructField>` (optional, keyword
          only argument)
  
          .. versionchanged:: 2.2.0
             Added optional ``metadata`` argument.
  
      Returns
      -------
      :class:`Column`
          Column representing whether each element of Column is aliased with new name or names.
  
      Examples
      --------
      >>> df = spark.createDataFrame(
      ...      [(2, "Alice"), (5, "Bob")], ["age", "name"])
      >>> df.select(df.age.alias("age2")).collect()
      [Row(age2=2), Row(age2=5)]
      >>> df.select(df.age.alias("age3", metadata={'max': 99})).schema['age3'].metadata['max']
      99
      """
  
      metadata = kwargs.pop("metadata", None)
      assert not kwargs, "Unexpected kwargs where passed: %s" % kwargs
  
      sc = get_active_spark_context()
      if len(alias) == 1:
          if metadata:
              assert sc._jvm is not None
              jmeta = (
                  sc._jvm.org.apache.spark.sql.types.Metadata.fromJson(
                      json.dumps(metadata)
                  )
              )
              return Column(getattr(self._jc, "as")(alias[0], jmeta))
          else:
              return Column(getattr(self._jc, "as")(alias[0]))
      else:
          if metadata is not None:
              raise PySparkValueError(
                  error_class="ONLY_ALLOWED_FOR_SINGLE_COLUMN",
                  message_parameters={"arg_name": "metadata"},
              )
          return Column(
              getattr(self._jc, "as")(_to_seq(sc, list(alias)))
          )
  
imports: import sys
  import json
  import warnings
  from typing import cast, overload, Any, Callable, Iterable, List, Optional, Tuple, TYPE_CHECKING, Union
  from py4j.java_gateway import JavaObject, JVMView
  from pyspark import copy_func
  from pyspark.context import SparkContext
  from pyspark.errors import PySparkAttributeError, PySparkTypeError, PySparkValueError
  from pyspark.sql.types import DataType
  from pyspark.sql.utils import get_active_spark_context
label_desc: Use image node_id 19 for calling the Column obj's underlying member method code with example usage: obj.alias() and returns: Column, Column, Column