Recursively flatten complex PySpark DataFrames with nested structs and arrays
Project description
spark-json-flatten
A lightweight utility to recursively flatten complex PySpark DataFrames containing deeply nested structs and arrays.
Features
- Recursive schema flattening
- Handles arbitrary nesting depth
- Uses
explode_outerfor safe array expansion - No UDFs, fully Spark-native
Installation
pip install spark-json-flatten
from spark_json_flatten import flatten_recursive
flattened_df = flatten_recursive(complex_df)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spark_json_flatten-0.1.1.tar.gz.
File metadata
- Download URL: spark_json_flatten-0.1.1.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0266e7d16d0ee03e8382e7739c26851d21d6627c0883adebe8c5b2c99833a05
|
|
| MD5 |
452458489532437374d171cc47455d76
|
|
| BLAKE2b-256 |
67436adead33333600a7694abdaac59c6239973fa74137645dfd78a47a0bd791
|
File details
Details for the file spark_json_flatten-0.1.1-py3-none-any.whl.
File metadata
- Download URL: spark_json_flatten-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b1cede007f8cb44b3839ad8c78a762c872bdf5346efb9b346a3751d5c0caa47
|
|
| MD5 |
05d75d27c115dbe59a805d3ab6cc2fa9
|
|
| BLAKE2b-256 |
ccbcba37fd661ea9acf4ca8562d3ed47305b379b6d9fbc245ac637192652ba57
|