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_pandas#

from_pandas(pdf: Any, schema: Optional[List[str]] = None) → pyflink.dataframe.dataframe.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.from_table

next

pyflink.dataframe.from_dict

Show Source

Created using Sphinx 4.5.0.