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_pandas

pyflink.dataframe.convert.from_pandas#

from_pandas(pdf: Any, schema: List[str] | None = None) → DataFrame[source]#

Create a DataFrame from a Pandas DataFrame.

Parameters:
  • pdf – The Pandas DataFrame.

  • schema – Optional list of column names. If None, uses pandas column names.

Returns:

A new DataFrame instance.

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

previous

pyflink.dataframe.convert.from_table

next

pyflink.dataframe.convert.from_dict

On this page
  • from_pandas()

This Page

  • Show Source

Created using Sphinx 7.4.7.

Built with the PyData Sphinx Theme 0.16.1.