{"id":18060504,"url":"https://github.com/florents-tselai/pandas-sets","last_synced_at":"2025-04-11T12:13:25.548Z","repository":{"id":57450460,"uuid":"163185263","full_name":"Florents-Tselai/pandas-sets","owner":"Florents-Tselai","description":"Set-oriented Operations in Pandas","archived":false,"fork":false,"pushed_at":"2020-05-27T17:23:50.000Z","size":10,"stargazers_count":24,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T08:38:19.884Z","etag":null,"topics":["data-science","pandas","set-operations","sets"],"latest_commit_sha":null,"homepage":"https://tselai.com/pandas-sets.html","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Florents-Tselai.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","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":"2018-12-26T13:53:04.000Z","updated_at":"2024-01-04T16:29:14.000Z","dependencies_parsed_at":"2022-08-25T23:00:55.933Z","dependency_job_id":null,"html_url":"https://github.com/Florents-Tselai/pandas-sets","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Florents-Tselai%2Fpandas-sets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Florents-Tselai%2Fpandas-sets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Florents-Tselai%2Fpandas-sets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Florents-Tselai%2Fpandas-sets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Florents-Tselai","download_url":"https://codeload.github.com/Florents-Tselai/pandas-sets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248398828,"owners_count":21097294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["data-science","pandas","set-operations","sets"],"created_at":"2024-10-31T04:08:43.613Z","updated_at":"2025-04-11T12:13:25.519Z","avatar_url":"https://github.com/Florents-Tselai.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pandas Sets: Set-oriented Operations in Pandas\n\nIf you store standard Python `set`s or `frozenset`s in your `Series` or `DataFrame` objects, you'll find this useful.\n\nThe `pandas_sets` package adds a `.set` accessor to any pandas `Series` object;\nit's like `.dt` for `datetime` or `.str` for `string`, but for [`set`](https://docs.python.org/3.7/library/stdtypes.html#set).\n\nIt exposes all public methods available in the standard [`set`](https://docs.python.org/3.7/library/stdtypes.html#set).\n\n## Installation\n```bash\npip install pandas-sets\n```\nJust import the `pandas_sets` package and it will register a `.set` accessor to any `Series` object.\n\n```python\nimport pandas_sets\n```\n\n## Examples\n```python\nimport pandas_sets\nimport pandas as pd\ndf = pd.DataFrame({'post': [1, 2, 3, 4],\n                    'tags': [{'python', 'pandas'}, {'philosophy', 'strategy'}, {'scikit-learn'}, {'pandas'}]\n                   })\n\npandas_posts = df[df.tags.set.contains('pandas')]\n\npandas_posts.tags.set.add('data')\n\npandas_posts.tags.set.update({'data', 'analysis'})\n\npandas_posts.tags.set.len()\n```\n\n## Notes\n* The implementation is primitive for now. It's based heavily on the pandas' core [`StringMethods`](https://github.com/pandas-dev/pandas/blob/52a2bb490556a86c5f756465320c18977dbe1c36/pandas/core/strings.py#L1783) implementation.\n* The public API has been tested for most expected scenarios.\n* The API will need to be extended to handle `NA` values appropriately.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflorents-tselai%2Fpandas-sets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflorents-tselai%2Fpandas-sets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflorents-tselai%2Fpandas-sets/lists"}