{"id":15014493,"url":"https://github.com/polaris000/snippets","last_synced_at":"2026-03-14T20:13:20.313Z","repository":{"id":126716305,"uuid":"606307962","full_name":"Polaris000/Snippets","owner":"Polaris000","description":"A collection of snippets and functions that I regularly use in my workflows as a data scientist. These snippets are utility functions that speed up my work, and focus on Pandas, Numpy and visualization libraries.","archived":false,"fork":false,"pushed_at":"2023-02-25T07:42:41.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-13T00:17:28.560Z","etag":null,"topics":["ipython","pandas","python","utilities","visualization"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/Polaris000.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":"2023-02-25T05:03:55.000Z","updated_at":"2023-02-25T20:05:05.000Z","dependencies_parsed_at":"2023-06-17T19:15:27.265Z","dependency_job_id":null,"html_url":"https://github.com/Polaris000/Snippets","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/Polaris000%2FSnippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polaris000%2FSnippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polaris000%2FSnippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polaris000%2FSnippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Polaris000","download_url":"https://codeload.github.com/Polaris000/Snippets/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243313409,"owners_count":20271178,"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":["ipython","pandas","python","utilities","visualization"],"created_at":"2024-09-24T19:45:41.799Z","updated_at":"2025-12-25T20:46:18.191Z","avatar_url":"https://github.com/Polaris000.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Snippets\n### About\nA collection of snippets and functions that I regularly use in my workflows as a data scientist. These snippets are utility functions that speed up my work, and focus on Pandas, Numpy and visualization libraries.\n\n\u003cimg width=\"900\" alt=\"image\" src=\"https://user-images.githubusercontent.com/31214064/221345273-f8ac9d27-9b7a-4b57-82b6-c03d6b9f6c57.png\"\u003e\n\n\n### Pandas\n| Snippet  | Code | Description |\n| ------------- | ------------- | ------------ |\n| ![](https://img.shields.io/badge/NEW-success/?style=flat-square) Boosted value_counts | [Code](./pandas/boosted_value_counts.ipynb)| This function improves the `value_counts` function by outputing absolute and normalized counts simultaneously, for faster analysis. It also sets the default value of `dropna` to False, so any NaNs that exist easily spotted.|\n| ![](https://img.shields.io/badge/NEW-success/?style=flat-square) Pandarallel Configuration| [Code](./pandas/pandarallel_config.ipynb)| Pandas isn't great when it comes to handling large amounts of data, mainly because it natively uses only a single core. Pandarallel is a very straightforward alternative to parallelize pandas code. |\n\n\n\n### IPython + Miscellaneous\n| Snippet  | Code | Description |\n| ------------- | ------------- | ------------ |\n| ![](https://img.shields.io/badge/NEW-success/?style=flat-square) Color print in jupyter notebooks | [Code](./ipython/color_print.ipynb)| Coloring specific values in your output can be an easy way to highlight important information. While there are packages like `termcolor` or `colorama`, I find that simply using ANSI color outputs works best. |\n| ![](https://img.shields.io/badge/NEW-success/?style=flat-square) Progress bars in jupyter notebooks | [Code](./ipython/tqdm_config.ipynb)| `tqdm` is a package that lets you create progress bars. While it has notebook specific versions via `tqdm_notebook`, I find that directly using `tqdm` works just as well without the hassle of setting up `ipywidgets` and `IProgress`.|\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolaris000%2Fsnippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolaris000%2Fsnippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolaris000%2Fsnippets/lists"}