{"id":37079881,"url":"https://github.com/dezounet/datadez","last_synced_at":"2026-01-14T09:39:51.997Z","repository":{"id":26409182,"uuid":"108768749","full_name":"dezounet/datadez","owner":"dezounet","description":"Pandas dataframe easy inspection, filtering, transformation: Get label distribution metrics, visualize multilabel columns through Chord diagram, filter label occurring less than a threshold, one-liner text/monolabel/multilabel columns vectorization, and many more to come.","archived":false,"fork":false,"pushed_at":"2022-06-21T21:12:25.000Z","size":103,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-08T07:14:21.158Z","etag":null,"topics":["datascience","dataset","filter","inspect","pandas","python","vectorizer"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dezounet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-29T20:29:03.000Z","updated_at":"2024-06-04T06:15:30.000Z","dependencies_parsed_at":"2022-09-11T08:40:13.090Z","dependency_job_id":null,"html_url":"https://github.com/dezounet/datadez","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/dezounet/datadez","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dezounet%2Fdatadez","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dezounet%2Fdatadez/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dezounet%2Fdatadez/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dezounet%2Fdatadez/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dezounet","download_url":"https://codeload.github.com/dezounet/datadez/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dezounet%2Fdatadez/sbom","scorecard":{"id":338858,"data":{"date":"2025-08-11","repo":{"name":"github.com/dezounet/datadez","commit":"fa14fc8bc7e1a50cc9cdaa90d11da0e57bf80b73"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/11 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"15 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2022-42991 / GHSA-v3c5-jqr6-7qm8","Warn: Project is vulnerable to: PYSEC-2021-356 / GHSA-2ww3-fxvq-293j","Warn: Project is vulnerable to: PYSEC-2024-167 / GHSA-cgvx-9447-vcch","Warn: Project is vulnerable to: PYSEC-2021-859 / GHSA-f8m6-h2c7-8h9x","Warn: Project is vulnerable to: PYSEC-2019-106 / GHSA-mr7p-25v2-35wr","Warn: Project is vulnerable to: PYSEC-2022-5 / GHSA-rqjh-jp2r-59cj","Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: GHSA-6p56-wp2h-9hxr","Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2020-73","Warn: Project is vulnerable to: PYSEC-2019-156 / GHSA-xp76-357g-9wqq","Warn: Project is vulnerable to: PYSEC-2023-102","Warn: Project is vulnerable to: PYSEC-2023-114"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T05:19:28.506Z","repository_id":26409182,"created_at":"2025-08-18T05:19:28.507Z","updated_at":"2025-08-18T05:19:28.507Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28416120,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["datascience","dataset","filter","inspect","pandas","python","vectorizer"],"created_at":"2026-01-14T09:39:51.323Z","updated_at":"2026-01-14T09:39:51.992Z","avatar_url":"https://github.com/dezounet.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![datadez.png](./docs/datadez.png)\n\n### Pandas dataframe inspection, filtering, balancing [![Build Status][travis-badge]][travis-link] [![MIT License][license-badge]](LICENSE)\n\nThe main goal of this package is to make your life easier if you want to:\n\n- Inspect a dataset and compute metrics about its columns content (auto type inference: numeric, mono-label or multi-label).\n- Filter the dataset one some criteria (minimum label occurrence, empty example).\n- Balance the dataset (TODO) in order to get better performance while training ML or NN models.\n\n### Requirements\n\n- Python 2.7 or 3.6\n- Numpy and Pandas\n\n### Usage\n\n1. Command line inspection\n\nYou can gain insight into your dataset, getting, among other things, label count, max/min/mean label occurrences (for mono and multi label columns).\n\n```python\n# Dataframe with numeric, mono-label, or multi-label (list, tuple, set) columns\ndf = pd.DataFrame(...)\n\n# Filter label not occurring much in column 'B'\nfrom datadez.filter import filter_small_occurrence\ndf = datadez.filter.filter_small_occurrence(df, column_name='B', min_occurrence=3)\n\n# Filter empty row based on column 'B' or 'C' values\nfrom datadez.filter import filter_empty\ndf = filter_empty(df, column_names=['B', 'C'])\n\n# Compute some metrics about your dataset\nimport pprint\nfrom datadez.summarize import summarize\ndf_summaries = summarize(df)\npprint.pprint(df_summaries)\n```\n\n2. Visual inspection\n\n```python\n# Dataframe with a multi-label column 'C'\ndf = pd.DataFrame(...)\n\n# Compute a plotly figure from this dataframe\nfrom datadez.dataviz import multilabel_plot\nfigure = multilabel_plot.intersection_matrix(df, 'C')\n\n# Plot the figure in a file. You can also do this inside a Jupyter notebook\nfrom plotly.offline import plot\nplot(figure, filename='chord-diagram.html')\n```\n\nOutput will look like this:\n\n![intersection_matrix.jpg](./docs/intersection_matrix.jpg)\n\n3. Transformation\n\nWith this code snippet:\n\n```python\n# Dataframe with numeric, text, mono-label, multi-label (list, tuple, set) columns\ndf = pd.DataFrame(...)\n\nprint(\"Original dataset:\")\nprint(df.head())\n\n# Vectorize text, mono-label and multi-label columns\nfrom datadez.transform import vectorize_dataset\ndf, vectorizers = vectorize_dataset(df)\n\nprint(\"Vectorized dataset:\")\nprint(df.head())\n```\n\nOne will get:\n\n    Original dataset:\n              A       B                                 C                                D\n    0 -0.585248  W2SIF2                                []     house jumps adorable crazily\n    1  0.569125  RYKAXC  [IRX7HF, AXQU0L, PM1E1Q, 1FCWZQ]            car swims odd merrily\n    2 -0.076040  7UVFIJ  [60WILH, NT28YD, 8IYE5F, 7UVFIJ]  monkey barfs clueless dutifully\n    3 -0.098878  U9WN5M                  [KS5EXD, YGTPR9]           boy runs odd dutifully\n    4  0.952773  SK1Z1M                          [AXQU0L]            boy barfs odd crazily\n    \n    Vectorized dataset:\n              A      C                                                          ...        D\n          value 1BNK1S 1FCWZQ 246K1M 3A48BH 60WILH 6C3VOQ 6LGS3T 7UVFIJ 8IYE5F  ...  merrily monkey occasionally odd puppy rabbit runs stupid swims weeps\n    0 -0.585248      0      0      0      0      0      0      0      0      0  ...        0      0            0   0     0      0    0      0     0     0\n    1  0.569125      0      1      0      0      0      0      0      0      0  ...        1      0            0   1     0      0    0      0     1     0\n    2 -0.076040      0      0      0      0      1      0      0      1      1  ...        0      1            0   0     0      0    0      0     0     0\n    3 -0.098878      0      0      0      0      0      0      0      0      0  ...        0      0            0   1     0      0    1      0     0     0\n    4  0.952773      0      0      0      0      0      0      0      0      0  ...        0      0            0   1     0      0    0      0     0     0\n    \n    [5 rows x 85 columns]\n\n### Do some tests\n\nJust clone this repository, and execute:\n\n    python -m tests.sample\n    \nThis will execute a test sample, for you to get what's going on:\n\n    Starting from this dataframe (len=100):\n              A       B                                 C                               D\n    0  0.745236  BBM7UP  [TUT7RS, MOW92W, 9O6IX6, T70X4Z]    donkey barfs dirty foolishly\n    1  0.484822  GPC8CL  [BG05XJ, IORYVC, BX9UK5, ERT4PJ]    girl hits clueless dutifully\n    2  0.673377  BK3OE7  [GPC8CL, GPC8CL, GPC8CL, BG05XJ]  car eats clueless occasionally\n    3  0.462564  AEAIH6                                []          car eats dirty crazily\n    4 -0.115847  T70X4Z                                []      girl hits adorable crazily\n    \n    With these metrics:\n    {u'A': {u'column_type': u'numeric',\n            u'mean': 0.048246178299744653,\n            u'std': 0.95162789611877563},\n     u'B': {u'column_type': u'mono-label',\n            u'imbalance_ratio': 6,\n            u'labels': 30,\n            u'occurrence_max': 6,\n            u'occurrence_mean': 3.3333333333333335,\n            u'occurrence_min': 1,\n            u'occurrence_std_dev': 1.4452988925785868},\n     u'C': {u'cardinality_mean': 1.6499999999999999,\n            u'cardinality_std_dev': 1.3955285736952863,\n            u'column_type': u'multi-label',\n            u'imbalance_ratio': 5,\n            u'labels': 29,\n            u'occurrence_max': 10,\n            u'occurrence_mean': 5.6896551724137927,\n            u'occurrence_min': 2,\n            u'occurrence_std_dev': 2.1189367580327199,\n            u'partitions': {u'imbalance_ratio': 29,\n                            u'labels': 65,\n                            u'occurrence_max': 29,\n                            u'occurrence_mean': 1.5384615384615385,\n                            u'occurrence_min': 1,\n                            u'occurrence_std_dev': 3.4555503761871074}},\n     u'D': {u'column_type': u'mono-label',\n            u'imbalance_ratio': 2,\n            u'labels': 98,\n            u'occurrence_max': 2,\n            u'occurrence_mean': 1.0204081632653061,\n            u'occurrence_min': 1,\n            u'occurrence_std_dev': 0.14139190265868387}}\n    \n    Filtering the small occurrences label of columns B and C...\n    We now get this (len=100):\n              A       B                                 C                               D\n    0  0.745236  BBM7UP                  [MOW92W, 9O6IX6]    donkey barfs dirty foolishly\n    1  0.484822  GPC8CL          [BG05XJ, IORYVC, ERT4PJ]    girl hits clueless dutifully\n    2  0.673377  BK3OE7  [GPC8CL, GPC8CL, GPC8CL, BG05XJ]  car eats clueless occasionally\n    3  0.462564  AEAIH6                                []          car eats dirty crazily\n    4 -0.115847  T70X4Z                                []      girl hits adorable crazily\n    \n    \n    Filtering empty entry example for column B or C...\n    \n    We finally have a clean dataframe (len=47):\n              A       B                                 C                               D\n    0  0.745236  BBM7UP                  [MOW92W, 9O6IX6]    donkey barfs dirty foolishly\n    1  0.484822  GPC8CL          [BG05XJ, IORYVC, ERT4PJ]    girl hits clueless dutifully\n    2  0.673377  BK3OE7  [GPC8CL, GPC8CL, GPC8CL, BG05XJ]  car eats clueless occasionally\n    5 -0.941320  7A37D6                          [76AYX1]    girl eats clueless dutifully\n    6  0.043402  7A37D6                          [BK3OE7]     rabbit jumps stupid merrily\n    \n    With these metrics:\n    {u'A': {u'column_type': u'numeric',\n            u'mean': 0.14122463494338683,\n            u'std': 0.9745937014876852},\n     u'B': {u'column_type': u'mono-label',\n            u'imbalance_ratio': 5,\n            u'labels': 20,\n            u'occurrence_max': 5,\n            u'occurrence_mean': 2.3500000000000001,\n            u'occurrence_min': 1,\n            u'occurrence_std_dev': 1.0618380290797651},\n     u'C': {u'cardinality_mean': 1.7872340425531914,\n            u'cardinality_std_dev': 0.84893350396851086,\n            u'column_type': u'multi-label',\n            u'imbalance_ratio': 3,\n            u'labels': 15,\n            u'occurrence_max': 9,\n            u'occurrence_mean': 5.5999999999999996,\n            u'occurrence_min': 3,\n            u'occurrence_std_dev': 1.5405626677721789,\n            u'partitions': {u'imbalance_ratio': 4,\n                            u'labels': 36,\n                            u'occurrence_max': 4,\n                            u'occurrence_mean': 1.3055555555555556,\n                            u'occurrence_min': 1,\n                            u'occurrence_std_dev': 0.69997795379745287}},\n     u'D': {u'column_type': u'mono-label',\n            u'imbalance_ratio': 1,\n            u'labels': 47,\n            u'occurrence_max': 1,\n            u'occurrence_mean': 1.0,\n            u'occurrence_min': 1,\n            u'occurrence_std_dev': 0.0}}\n\n[travis-badge]:    https://travis-ci.org/dezounet/datadez.svg?branch=master\n[travis-link]:     https://travis-ci.org/dezounet/datadez\n[license-badge]:   https://img.shields.io/badge/license-MIT-007EC7.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdezounet%2Fdatadez","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdezounet%2Fdatadez","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdezounet%2Fdatadez/lists"}