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 Creation
  • pyflink.dataframe.convert.from_dict

pyflink.dataframe.convert.from_dict#

from_dict(data: Mapping[str, Sequence[Any]], schema: List[str] | None = None) → 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.convert.from_pandas

next

pyflink.dataframe.convert.from_records

On this page
  • from_dict()

This Page

  • Show Source

Created using Sphinx 7.4.7.

Built with the PyData Sphinx Theme 0.16.1.