A package for manipulating Python data structures.
Project description
manipulating_data
manipulating_data is a package for slicing and dicing Python data structures, such as dictionaries, sets, or pandas DataFrames.
Features
- Conveniently examine the contents of dictionaries by subsetting them in a fashion similar to list slicing.
- Determine whether two pandas DataFrames are equal (have the same values in the same columns).
- Find the intersection of an arbitrary number of sets.
- Combine dictionaries with parts of the data into a larger dictionary with all of the data.
- Determine the intersection (shared columns) of an arbitrary number of pandas DataFrames.
Installation
pip install manipulating_data
Usage
import manipulating_data as md
md.intersection_of_n_sets( [ {'a', 'b', 'c'}, {'a', 'b', 'd'}, {'a', 'b', 'e'} ] )
{'a', 'b'}
md.slicing_diction( { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5}, stop = 2 )
{'a': 1, 'b': 2}
md.concat_diction( [ {'USA' : 73899, 'Canada' : 89743}, {'USA' : 85876, 'Canada' : 56899} ] )
{'Canada': [89743, 56899], 'USA': [73899, 85876]}
Contributing
Contributions from the community to improve this project are welcomed. To contribute, please follow these steps:
- Fork this repository.
- Make your changes.
- Create a pull request.
We appreciate your help in making this project better!
License
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 manipulating_data-0.1.1.tar.gz.
File metadata
- Download URL: manipulating_data-0.1.1.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b9e2399cf845d39fc3980c97006914e2f7e0c3cf49c398c84d1dbc6010708cc
|
|
| MD5 |
5d9a23bc835827f724e19a0dc4166d20
|
|
| BLAKE2b-256 |
fcf8174ecc17962eb53b78ec23add27c0b3266a7d5ed537cef876ff97ce73272
|
File details
Details for the file manipulating_data-0.1.1-py3-none-any.whl.
File metadata
- Download URL: manipulating_data-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
649e8880093d3d07e86530e1af580124063ae79067d38655fa3af0219cec33fc
|
|
| MD5 |
884ef0fe6984f5e4946ae38cef0c0450
|
|
| BLAKE2b-256 |
14eeb551a089d0e8539b1b40a7293a18bc084c8d870f430a1af208446a3eb867
|