Ctrl+K
Logo image Logo image

Site Navigation

  • API Reference
  • Examples

Site Navigation

  • API Reference
  • Examples

Section Navigation

  • PyFlink Table
  • PyFlink DataFrame
    • DataFrame
    • DataFrame Creation
    • Input/Output
    • SQL
    • Data Types
    • User Defined Functions
    • Configuration
    • Catalog
    • GPU Support
    • AI / LLM
  • PyFlink Multimodal
  • PyFlink DataStream
  • PyFlink Common

pyflink.dataframe.from_dict#

from_dict(data: Mapping[str, Sequence[Any]], schema: Optional[List[str]] = None) → pyflink.dataframe.dataframe.DataFrame[source]#

Create a DataFrame from a dictionary of sequences.

Parameters
  • data – A dictionary where keys are column names and values are sequences of column values. All sequences must have the same length.

  • schema – Optional list of column names. If provided, only these columns will be used, in this order. If None, uses all keys from data.

Returns

A new DataFrame.

Example::
>>> import pyflink.dataframe as pf
>>> df = pf.from_dict({"a": [1, 2, 3], "b": ["x", "y", "z"]})

previous

pyflink.dataframe.from_pandas

next

pyflink.dataframe.from_records

Show Source

Created using Sphinx 4.5.0.