Skip to main content
Ctrl+K
PyFlink 1.20+vvr.11.7.dev0 documentation - Home PyFlink 1.20+vvr.11.7.dev0 documentation - Home
  • API Reference
  • Examples
  • API Reference
  • Examples

Section Navigation

  • PyFlink Table
  • PyFlink DataStream
  • PyFlink DataFrame
    • DataFrame
    • DataFrame Creation
    • Input/Output
    • SQL
    • DataType
    • User Defined Functions
    • Configuration
    • GPU Support
    • AI / LLM
  • PyFlink Common
  • API Reference
  • PyFlink DataFrame
  • DataFrame
  • pyflink.dataframe.dataframe.DataFrame.select

pyflink.dataframe.dataframe.DataFrame.select#

DataFrame.select(*columns, **projections) → DataFrame[source]#

Select columns from the DataFrame.

Supports multiple input formats: - String column names - Expression objects - Lists/tuples of column names or expressions - Keyword arguments for renaming columns

Parameters:
  • *columns – Columns to select. Can be strings, Expressions, or lists.

  • **projections – Column projections as name=expression. The name becomes the new column name.

Returns:

A new DataFrame with selected columns.

Example::
>>> df.select("a", "b")                    # Select columns by name
>>> df.select(col("a"), col("b"))          # Select with expressions
>>> df.select("a", c=col("a") + 1)         # Mix strings and kwargs
>>> df.select(["a", "b"])                  # List of column names
>>> df.select(x=col("a"), y=col("b"))      # Rename with kwargs

previous

DataFrame

next

pyflink.dataframe.dataframe.DataFrame.with_column

On this page
  • DataFrame.select()

This Page

  • Show Source

Created using Sphinx 7.4.7.

Built with the PyData Sphinx Theme 0.16.1.