Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 126 methods to generate metadata #132

Merged
merged 17 commits into from
Nov 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 5 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,60 +67,18 @@ function:
```python
from sdv import load_demo

metadata, tables = load_demo()
metadata, tables = load_demo(metadata=True)
```

This will return two objects:

1. A `metadata` dictionary with all the information that **SDV** needs to know about the dataset:
1. A `Metadata` object with all the information that **SDV** needs to know about the dataset.

```
{
"tables": [
{
"fields": [
{"name": "user_id", "type": "id"},
{"name": "country", "type": "categorical"},
{"name": "gender", "type": "categorical"},
{"name": "age", "type": "numerical", "subtype": "integer"}
],
"name": "users",
"primary_key": "user_id"
},
{
"fields": [
{"name": "session_id", "type": "id"},
{"name": "user_id", "type": "id", "ref": {
"field": "user_id", "table": "users"},
},
{"name": "device", "type": "categorical"},
{"name": "os", "type": "categorical"}
],
"name": "sessions",
"primary_key": "session_id"
},
{
"fields": [
{"name": "transaction_id", "type": "id"},
{"name": "session_id", "type": "id", "ref": {
"field": "session_id", "table": "sessions"},
},
{"name": "timestamp", "format": "%Y-%m-%d", "type": "datetime"},
{"name": "amount", "type": "numerical", "subtype": "float"},
{"name": "approved", "type": "boolean"}
],
"name": "transactions",
"primary_key": "transaction_id"
}
]
}
```

For more details about the Metadata format, please refer to [the corresponding section
of the documentation](https://hdi-project.github.io/SDV/metadata.html)
For more details about how to build the `Metadata` for your own dataset, please refer to the
[Metadata](https://hdi-project.github.io/SDV/metadata.html) section of the documentation.

2. A dictionary containing three `pandas.DataFrames` with the tables described in the
metadata dictionary.
metadata object.

The returned objects contain the following information:

Expand Down
Loading