Skip to content

Commit

Permalink
v0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
loco-philippe committed Jan 5, 2024
1 parent 4e074a9 commit 9b12881
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 20 deletions.
34 changes: 18 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,22 @@ It also identifies data that does not respect given relationships.

Finally, it proposes transformations of the data set to respect a set of relationships.

TAB-dataset is used by [ntv_pandas](https://github.com/loco-philippe/ntv-pandas/blob/main/README.md) to identify consistency errors in DataFrame.

## Examples

Here is a price list of different foods based on packaging.

| 'plants' | 'quantity' | 'product' | 'price' |
|-------------|------------|-----------|---------|
| 'fruit' | '1 kg' | 'apple' | 1 |
| 'fruit' | '10 kg' | 'apple' | 10 |
| 'fruit' | '1 kg' | 'orange' | 2 |
| 'fruit' | '10 kg' | 'orange' | 20 |
| 'vegetable' | '1 kg' | 'peppers' | 1.5 |
| 'vegetable' | '10 kg' | 'peppers' | 15 |
| 'fruit' | '1 kg' | 'banana' | 0.5 |
| 'fruit' | '10 kg' | 'banana' | 5 |
| plants | quantity | product | price |
|-----------|----------|---------|-------|
| fruit | 1 kg | apple | 1 |
| fruit | 10 kg | apple | 10 |
| fruit | 1 kg | orange | 2 |
| fruit | 10 kg | orange | 20 |
| vegetable | 1 kg | peppers | 1.5 |
| vegetable | 10 kg | peppers | 15 |
| fruit | 1 kg | banana | 0.5 |
| fruit | 10 kg | banana | 5 |

In this example, we observe two kinds of relationships:

Expand All @@ -42,12 +44,12 @@ In this example, we observe two kinds of relationships:

Another observation is that each record has a specific combination of 'product' and 'quantity', it will be possible to convert this dataset in matrix:

| price | '1 kg' | '10 kg'|
|-----------|--------|--------|
| 'apple' | 1 | 10 |
| 'orange' | 2 | 20 |
| 'peppers' | 1.5 | 15 |
| 'banana' | 0.5 | 5 |
| price | 1 kg | 10 kg|
|---------|------|------|
| apple | 1 | 10 |
| orange | 2 | 20 |
| peppers | 1.5 | 15 |
| banana | 0.5 | 5 |

```python
In [1]: # creation of the `prices` object
Expand Down
3 changes: 2 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ The documentation presents :
- API
- [dev](https://loco-philippe.github.io/tab-dataset/tab_dataset.html)
- [v0.1.0](https://loco-philippe.github.io/tab-dataset/v0.1.0/tab_dataset.html)
- [v0.1.1](https://loco-philippe.github.io/tab-dataset/v0.1.1/tab_dataset.html)
- Release
- [all versions](https://github.com/loco-philippe/tab-dataset/tree/main/docs/release.rst)

# Roadmap

- **interface** : standard interfaces with tabular applications
Expand Down
9 changes: 9 additions & 0 deletions docs/release.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
Version x.y.z
=============

0.1.1 RC1 (2023-01-05)
--------------------

- add method `check_relation` in Cfield class
- add 'unique' Field in string representation
- consistency with NTV for default datatype 'json'
- bugs #1, #2

0.1.0 RC1 (2023-11-23)
--------------------

- First release candidate

- **constructor**
Expand Down
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
"""
Created on Thu Sep 19 2023
@author: [email protected]
"""

Expand All @@ -13,7 +11,7 @@

setup(
name="tab_dataset",
version="0.1.0",
version="0.1.1",
description="TAB-dataset : A tool for structuring tabular data",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 9b12881

Please sign in to comment.