kpt_flatten_json
Project description
Description
Kpt-flatten-json pypi package helps to flatten a dataframe containing complex datatypes like arrays and structures.
Install
$ [sudo] pip install kpt_flatten_json
Functions
kpt_flatten_json: Returns a flattened dataframe
Example
from kpt_flatten_json import *
flatdf= kpt_flatten_json(complexdf)
----------------------complexdf-----------------------
|batters|id|name| ppu|topping| type|
|{[{1001, Regular}...|0001|Cake|0.55|[{5001, None}, {5...|donut|
-------------------------flatdf---------------------------
|id|name|ppu|type|topping_id|topping_type|batters_batter_id|batters_batter_type|
|0001|Cake|0.55|donut| 5001| None| 1001| Regular|
|0001|Cake|0.55|donut| 5001| None| 1002| Chocolate|
|0001|Cake|0.55|donut| 5001| None| 1003| Blueberry|
|0001|Cake|0.55|donut| 5001| None| 1004| Devil's Food|
|0001|Cake|0.55|donut| 5002| Glazed| 1001| Regular|
|0001|Cake|0.55|donut| 5002| Glazed| 1002| Chocolate|
|0001|Cake|0.55|donut| 5002| Glazed| 1003| Blueberry|
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
Hashes for kn_flatten_json-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36f6f47a055801f88905d1bcd013298d7a723b1a7fac0d2057213234e656843e |
|
MD5 | 35b15cd30552f34c9cb4232839ff1611 |
|
BLAKE2b-256 | ad6dae6c0c1ee5654b770d5d634fd3e12fb72f4ed36ba4a60d882f8fb83b13c0 |