本文簡要介紹 python 語言中 pyflink.common.Row
的用法。
用法:
class pyflink.common.Row(*args, **kwargs)
基礎:
object
表中的一行。可以訪問其中的字段:
類似屬性(
row.key
)像字典值(
row[key]
)
key in row
將搜索行鍵。Row 可用於通過使用命名參數創建行對象,字段將按名稱排序。不允許省略命名參數來表示值為 None 或缺失。在這種情況下,這應該明確設置為 None。
>>> row = Row(name="Alice", age=11) >>> row Row(age=11, name='Alice') >>> row['name'], row['age'] ('Alice', 11) >>> row.name, row.age ('Alice', 11) >>> 'name' in row True >>> 'wrong_key' in row False
Row 也可以用來創建另一個 Row 類,然後它可以用來創建 Row 對象,例如
>>> Person = Row("name", "age") >>> Person <Row(name, age)> >>> 'name' in Person True >>> 'wrong_key' in Person False >>> Person("Alice", 11) Row(name='Alice', age=11)
相關用法
- Python pyflink Row.as_dict用法及代碼示例
- Python pyflink RocksDBStateBackend.set_predefined_options用法及代碼示例
- Python pyflink RocksDBStateBackend用法及代碼示例
- Python pyflink ReduceFunction用法及代碼示例
- Python pyflink Table.intersect_all用法及代碼示例
- Python pyflink GroupedTable.select用法及代碼示例
- Python pyflink StreamTableEnvironment.from_data_stream用法及代碼示例
- Python pyflink Expression.to_date用法及代碼示例
- Python pyflink Table.fetch用法及代碼示例
- Python pyflink PulsarSourceBuilder用法及代碼示例
- Python pyflink TableEnvironment.create_temporary_function用法及代碼示例
- Python pyflink Table.right_outer_join用法及代碼示例
- Python pyflink Expression.json_value用法及代碼示例
- Python pyflink Table.distinct用法及代碼示例
- Python pyflink WatermarkStrategy.with_timestamp_assigner用法及代碼示例
- Python pyflink TableEnvironment.register_table_source用法及代碼示例
- Python pyflink Table.where用法及代碼示例
- Python pyflink Expression.end用法及代碼示例
- Python pyflink lit用法及代碼示例
- Python pyflink TableEnvironment.create_java_temporary_function用法及代碼示例
- Python pyflink StreamTableEnvironment.create用法及代碼示例
- Python pyflink Table.drop_columns用法及代碼示例
- Python pyflink Expression.over用法及代碼示例
- Python pyflink Table.execute用法及代碼示例
- Python pyflink StreamExecutionEnvironment.set_restart_strategy用法及代碼示例
注:本文由純淨天空篩選整理自apache.org大神的英文原創作品 pyflink.common.Row。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。