[jira] [Created] (FLINK-20483) Support Pandas UDF for Map Operation in Python Table API

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-20483) Support Pandas UDF for Map Operation in Python Table API

Shang Yuanchun (Jira)
Huang Xingbo created FLINK-20483:
------------------------------------

             Summary: Support Pandas UDF for Map Operation in Python Table API
                 Key: FLINK-20483
                 URL: https://issues.apache.org/jira/browse/FLINK-20483
             Project: Flink
          Issue Type: Sub-task
          Components: API / Python
            Reporter: Huang Xingbo
             Fix For: 1.13.0


Support Pandas UDF for Map Operation in Python Table API

The usage:
{code:java}
t = ...  # type: Table, table schema: [a: String, b: Int, c: Int]

# map Pandas UDF
import pandas
pandas_map_func = udf(lambda x, y: pd.concat([x, y], axis=1),
                   result_type=DataTypes.ROW([DataTypes.FIELD("a",DataTypes.INT()),
                                          DataTypes.FIELD("b", DataTypes.INT())]))
t.map(pandas_map_func(b, c))
{code}
 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)