schema_helpers
print_schema_as_code(schema, prepend_pl=False)
Takes a schema as input and prints it as valid code, with an option to prepend 'pl.' to the column types.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
schema |
OrderedDict[str, DataType]
|
An OrderedDict where the keys are column names (strings) and the values are data types (DataType) |
required |
prepend_pl |
bool
|
The |
False
|
Source code in harley/schema_helpers.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|