{"id":19637044,"url":"https://github.com/caiocarneloz/pdtug","last_synced_at":"2026-05-26T16:37:17.173Z","repository":{"id":201485638,"uuid":"184934175","full_name":"caiocarneloz/pdtug","owner":"caiocarneloz","description":"Unweighted graph from Pandas numerical Dataframe","archived":false,"fork":false,"pushed_at":"2019-09-27T12:50:02.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-21T16:03:42.405Z","etag":null,"topics":["graph","machine-learning","pandas-dataframe","python","random-walk"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/caiocarneloz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-05-04T19:04:47.000Z","updated_at":"2019-09-27T12:50:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"a08ab8ec-75e5-487b-8858-13148c33d450","html_url":"https://github.com/caiocarneloz/pdtug","commit_stats":null,"previous_names":["caiocarneloz/pdtug"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/caiocarneloz/pdtug","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caiocarneloz%2Fpdtug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caiocarneloz%2Fpdtug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caiocarneloz%2Fpdtug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caiocarneloz%2Fpdtug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caiocarneloz","download_url":"https://codeload.github.com/caiocarneloz/pdtug/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caiocarneloz%2Fpdtug/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33530323,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"ssl_error","status_checked_at":"2026-05-26T15:22:15.568Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["graph","machine-learning","pandas-dataframe","python","random-walk"],"created_at":"2024-11-11T12:32:58.577Z","updated_at":"2026-05-26T16:37:17.155Z","avatar_url":"https://github.com/caiocarneloz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pdtug\nUnweighted graphs from pandas numerical dataframes\n\n## Getting Started\n#### Dependencies\nYou need Python 3.7 or later to use **pdtug**. You can find it at [python.org](https://www.python.org/).\n\nYou also need pandas and numpy packages, which is available from [PyPI](https://pypi.org). If you have pip, just run:\n```\npip install pandas\npip install numpy\n```\n#### Installation\nClone this repo to your local machine using:\n```\ngit clone https://github.com/caiocarneloz/pdtug.git\n```\n\n## Features\n- Get a unweighted graph from a pandas dataframe\n  - ~~Choose from multiple distance functions~~(soon)\n  - ~~Choose between k-nearest neighbours and distance threshold~~(soon)\n\n\n## Usage\nThe **pdtug** function takes as argument a dataframe containing numerical data and an integer _k_ value which represents the number of nearest neighbours to be considered on the edge creation. As example, the image below shows the relationship between nodes with _k_ = 2:\n\n![alt text](https://i.imgur.com/fnHbRGy.gif)\n\nAs output, the function returns a python dictionary with the format of an adjacency list:\n```\n{0: [8, 3, 4, 7],\n 1: [8, 6, 7],\n 2: [8, 9, 5, 6],\n 3: [0, 8, 4],\n 4: [8, 0, 3],\n 5: [8, 9, 2],\n 6: [1, 2, 7],\n 7: [0, 1, 6],\n 8: [0, 1, 2, 3, 4, 5, 9],\n 9: [8, 2, 5]}\n```\nEach value corresponds to the dataframe row index.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaiocarneloz%2Fpdtug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaiocarneloz%2Fpdtug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaiocarneloz%2Fpdtug/lists"}