Creates an empty table with a schema specified by kwargs. Args: kwargs: Dict whose keys are column names and values are column types. Returns: Table: Created empty table. Example: >>> import pathway as pw >>> t1 = pw.Table.empty(ag
(**kwargs: dt.DType)
| 360 | @staticmethod |
| 361 | @check_arg_types |
| 362 | def empty(**kwargs: dt.DType) -> Table: |
| 363 | """Creates an empty table with a schema specified by kwargs. |
| 364 | |
| 365 | Args: |
| 366 | kwargs: Dict whose keys are column names and values are column types. |
| 367 | |
| 368 | Returns: |
| 369 | Table: Created empty table. |
| 370 | |
| 371 | |
| 372 | Example: |
| 373 | |
| 374 | >>> import pathway as pw |
| 375 | >>> t1 = pw.Table.empty(age=float, pet=float) |
| 376 | >>> pw.debug.compute_and_print(t1, include_id=False) |
| 377 | age | pet |
| 378 | """ |
| 379 | from pathway.internals import table_io |
| 380 | |
| 381 | ret = table_io.empty_from_schema(schema_from_types(None, **kwargs)) |
| 382 | ret._universe.register_as_empty(no_warn=True) |
| 383 | return ret |
| 384 | |
| 385 | @trace_user_frame |
| 386 | @desugar |