{"id":22367951,"url":"https://github.com/dridk/pandas-ninja","last_synced_at":"2025-07-30T17:33:17.382Z","repository":{"id":63154796,"uuid":"547838657","full_name":"dridk/pandas-ninja","owner":"dridk","description":"game challenges for python pandas","archived":false,"fork":false,"pushed_at":"2022-11-19T14:39:16.000Z","size":1100,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-01T21:19:20.614Z","etag":null,"topics":["pandas","pandas-tutorial","python","teaching-tool"],"latest_commit_sha":null,"homepage":"","language":"Svelte","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/dridk.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}},"created_at":"2022-10-08T11:50:02.000Z","updated_at":"2024-03-13T18:07:37.000Z","dependencies_parsed_at":"2023-01-22T05:22:46.039Z","dependency_job_id":null,"html_url":"https://github.com/dridk/pandas-ninja","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/dridk%2Fpandas-ninja","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dridk%2Fpandas-ninja/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dridk%2Fpandas-ninja/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dridk%2Fpandas-ninja/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dridk","download_url":"https://codeload.github.com/dridk/pandas-ninja/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228166700,"owners_count":17879474,"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":["pandas","pandas-tutorial","python","teaching-tool"],"created_at":"2024-12-04T18:25:19.649Z","updated_at":"2024-12-04T18:25:20.239Z","avatar_url":"https://github.com/dridk.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pandas ninja\n\nSource code of pandas ninja https://pandas.ninja. \n\nPandas ninja is teaching game made to become a master with the [pandas](https://pandas.pydata.org/) python libraires. There are challenges produced by the community and player must resolve it using one python expression. This application was possible thanks to the [pyodide.js](https://pyodide.org/en/stable/) library which makes possible to run python from client side. \n\nIt is my first web application made with the following technology.  So feel free to fix my code and add contribution. \n\n- [svelte](https://svelte.dev/) \n- [vite](https://vitejs.dev/) \n- [tailwindcss](https://tailwindcss.com/)\n- [daisyui](https://daisyui.com) \n- [pyodide](https://pyodide.org/en/stable/)\n\n\n## Challenges contribution \n\nI invite you to create challenges and share them by making using pull request.   \nA challenge is a json file with an input and an expected dataframe.     \nAll challenges are stored in the [public/challenges/](https://github.com/dridk/pandas-ninja/blob/main/public/challenges/) folder.\n\n### Examples \n\n```json\n{\n  \"title\": \"example\",\n  \"author\": \"@author_name\",\n  \"placeholder\": \"#This text will be place into the code editor \\nprint(df)\",\n  \"input\": [\n    {\n      \"count\": 2,\n      \"fruits\": \"apple\"\n    },\n    {\n      \"count\": 4,\n      \"fruits\": \"banana\"\n    }\n    ], \n     \"expected\": [\n    {\n      \"count\": 4,\n      \"fruits\": \"apple\"\n    },\n    {\n      \"count\": 2,\n      \"fruits\": \"banana\"\n    }\n    ]\n    \n\n```\n\n\n### challenge.py \n\na python script [challenge.py](https://raw.githubusercontent.com/dridk/pandas-ninja/main/challenge.py) is available to create challenges. It depends only on `simplejson` and `pandas`.\n\n#### Setup\n```bash\npip install simplejson\nwget https://raw.githubusercontent.com/dridk/pandas-ninja/main/challenge.py\n```\n\nCreate a script file with the following code : \n\n```python\nfrom challenge import Challenge\nimport pandas as pd\nimport numpy as np\n\nfile = \"public/challenges/my_challenge.py\"\nc = Challenge()\nc.name= \"my challenge\"\nc.author  = \"@github_account\"\nc.placeholder= \" # A comment to put on source code editor \" \n\nc.input_df = pd.DataFrame(...)\nc.expected_df = pd.DataFrame(...)\n\nc.show()\nc.save(file)\n\n```\n\n\n## Launch the web app\n\n```\ngit clone https://github.com/dridk/pandas-ninja\ncd pandas-ninja\nnpm install \nnpm run dev \n\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdridk%2Fpandas-ninja","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdridk%2Fpandas-ninja","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdridk%2Fpandas-ninja/lists"}