{"id":15359734,"url":"https://github.com/redhog/embarrassmentofpandas","last_synced_at":"2025-10-05T17:32:51.454Z","repository":{"id":136340132,"uuid":"307075563","full_name":"redhog/EmbarrassmentOfPandas","owner":"redhog","description":null,"archived":false,"fork":false,"pushed_at":"2020-12-11T14:28:10.000Z","size":71,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-12T07:54:05.709Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/redhog.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-25T10:38:19.000Z","updated_at":"2020-12-11T14:28:13.000Z","dependencies_parsed_at":"2023-07-27T04:45:26.417Z","dependency_job_id":null,"html_url":"https://github.com/redhog/EmbarrassmentOfPandas","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhog%2FEmbarrassmentOfPandas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhog%2FEmbarrassmentOfPandas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhog%2FEmbarrassmentOfPandas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhog%2FEmbarrassmentOfPandas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redhog","download_url":"https://codeload.github.com/redhog/EmbarrassmentOfPandas/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423492,"owners_count":20936622,"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":[],"created_at":"2024-10-01T12:45:59.828Z","updated_at":"2025-10-05T17:32:46.387Z","avatar_url":"https://github.com/redhog.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EmbarrassmentOfPandas\n\nAn embarrassment of pandas is a group of pandas. This library helps\ngrouping Pandas DataFrames together and provide an object oriented\nprogramming paradigm on top of Pandas DataFrames.\n\nEOP allows you to define new datatypes for your columns, that in turn\nhave columns. For example, you could define a datatype Point that has\nthree columns, x,y,z, and then use this datatype wherever you need to\nstore points in other datasets.\n\nThe data structure corresponding to a DataFrame in EOP is called an\nDataInstance. The main difference is that you can subclass an\nDataInstance and use that as a datatype for a column in another\nDataInstance:\n\n    \u003e\u003e\u003e import pandas as pd, numpy as np, eop\n    \u003e\u003e\u003e class A(eop.DataInstance): pass\n    ... \n    \u003e\u003e\u003e class B(eop.DataInstance): pass\n    ... \n    \u003e\u003e\u003e a = A({\"foo\": [1,2,3,4], \"fie\":[5,6,7,8], \"naja\":[9,10,11,12], \"hehe\":[13,14,15,16]})\n    \u003e\u003e\u003e b = B({\"fie\":[25,26,27,28], \"muae\":[29,210,211,212]})\n    \u003e\u003e\u003e a[\"b\"] = b\n    \u003e\u003e\u003e a.dtypes\n    foo                    int64\n    fie                    int64\n    naja                   int64\n    hehe                   int64\n    b       \u003cclass '__main__.B'\u003e\n    Name: 0, dtype: object\n    \u003e\u003e\u003e a\n      \u003c__main__.A\u003e                                \n               foo fie naja hehe            b     \n                                 \u003c__main__.B\u003e     \n                                          fie muae\n    0            1   5    9   13           25   29\n    1            2   6   10   14           26  210\n    2            3   7   11   15           27  211\n    3            4   8   12   16           28  212\n    \u003e\u003e\u003e a[\"b\"]\n      \u003c__main__.B\u003e     \n               fie muae\n    0           25   29\n    1           26  210\n    2           27  211\n    3           28  212\n\nThe main advantage of using DataInstance subclasses as datatypes is\nthat you can define additional methods on them. These methods would\nthen use regular numpy/pandas methods to operate across all the rows\nof the DataInstance. For example, you could define methods like these\n\n    \u003e\u003e\u003e cloud[\"point\"].rotate_around(coord)\n    \u003e\u003e\u003e ground[\"topo\"].reproject(new_crs)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhog%2Fembarrassmentofpandas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredhog%2Fembarrassmentofpandas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhog%2Fembarrassmentofpandas/lists"}