Checking Compatibility
src.dx.datatypes.compatibility.test_compatibility(value, as_dataframe=True)
Convenience function to test the compatibility of a given object
with the different steps involved with the dx display modes.
- pandas.io.json.build_table_schema
(https://github.com/pandas-dev/pandas/blob/main/pandas/io/json/_table_schema.py)
- jupyter_client.jsonutil.json_clean
(https://github.com/jupyter/jupyter_client/blob/main/jupyter_client/jsonutil.py)
- duckdb conn.register
- final dx output type
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
Any
|
The value to test compatibility with. |
required |
as_dataframe |
bool
|
Whether to return the results as a pandas DataFrame (if |
True
|
Source code in src/dx/datatypes/compatibility.py
src.dx.datatypes.compatibility.test_build_table_schema(value, as_dataframe=False)
Convenience function to test the compatibility of a given object with the pandas.io.json.build_table_schema function, which is called to set up the initial column schema during dx formatting.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
Any
|
The value to test compatibility with. |
required |
as_dataframe |
bool
|
Whether to return the results as a pandas DataFrame (if |
False
|
Source code in src/dx/datatypes/compatibility.py
src.dx.datatypes.compatibility.test_json_clean(value, as_dataframe=False)
Convenience function to test the compatibility of a given object with the jupyter_client.jsonutil.json_clean function, which is called during IPython.display after dx formatting.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
Any
|
The value to test compatibility with. |
required |
as_dataframe |
bool
|
Whether to return the results as a pandas DataFrame (if |
False
|
Source code in src/dx/datatypes/compatibility.py
src.dx.datatypes.compatibility.test_db_write(value, as_dataframe=False)
Convenience function to test the compatibility of a given object inside a pandas DataFrame during registration with a duckdb connection, which is used during Datalink-enabled dataframe tracking for push-down filtering.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
Any
|
The value to test compatibility with. |
required |
as_dataframe |
bool
|
Whether to return the results as a pandas DataFrame (if |
False
|
Source code in src/dx/datatypes/compatibility.py
src.dx.datatypes.compatibility.test_dx_handling(value, as_dataframe=False)
Convenience function to test the compatibility of a given object inside a pandas DataFrame through the entire dx formatting and data type handling process.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
Any
|
The value to test compatibility with. |
required |
as_dataframe |
bool
|
Whether to return the results as a pandas DataFrame (if |
False
|