Name | pandas-shortcuts JSON |
Version |
0.1
JSON |
| download |
home_page | None |
Summary | Why even wait for autocompletion when you can use `pandas_shortcuts`? |
upload_time | 2024-07-24 07:47:02 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.6 |
license | MIT License Copyright (c) 2021 BaoGiang HoangVu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
shortcut
pandas
|
VCS |
|
bugtrack_url |
|
requirements |
numpy
pandas
|
Travis-CI |
No Travis.
|
coveralls test coverage |
|
<h1 align="center">pandas-shortcuts</h1>
<p align="center">Why even wait for autocompletion when you can use <code>pandas_shortcuts</code>?
</p>
<p align="center">
<a href="https://github.com/baogianghoangvu"><img src="https://img.shields.io/static/v1?logo=github&label=maintainer&message=baogianghoangvu&color=violet"></a>
<a href="https://github.com/lpun-majessica"><img src="https://img.shields.io/static/v1?logo=github&label=co-maintainer&message=lpun-majessica&color=3EAAAF"></a>
</p>
<p align="center">
<a href="https://github.com/baogianghoangvu/pandas-shortcuts/blob/main/pandas_shortcuts/__init__.py"><img src="https://img.shields.io/badge/version-0.1-informational"></a>
<a href="https://github.com/python/cpython"><img src="https://img.shields.io/badge/python->=3.6-important"></a>
<a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-black"></a>
</p>
## How to use
- Simply import `pandas_shortcuts` together with `pandas`.
```Python
import pandas as pd
import pandas_shortcuts
```
- Every `pd.DataFrame` and `pd.Series` objects will have:
- Shortcuts (full list [below](#available-shortcuts-and-methods))
```Python
# shortcut for `df.head()`
df.h()
# shortcut for df.columns
df.c
# shortcut for df["col"].unique()
df["col"].u()
```
- New methods (full list [below](#available-shortcuts-and-methods))
```Python
# view up to `r` rows and `c` columns of a dataframe, overriding pandas' default limit
df.v() # default r=50, c=50
# view up to `r` rows of a series, overriding pandas' default limit
df["col"].v(100)
# stylize a dataframe's numeric columns as heatmap or bars
# view up to `r` rows and `c` of a dataframe, overriding pandas' default limit
df.sh() # style=heatmap
df.sb() # style=bar
```
## Note
- `df.v()` directly generates `IPython.core.display.HTML` object under the hood, thus completely bypassing any `pd.set_option("display.max_rows", ...)` and `pd.set_option("display.max_columns", ...)` that the user may have specified.
## Available Shortcuts and Methods
<details>
<summary><b><i><font size="3">
Top Level API
</font></i></b></summary>
```Python
pd.df # pd.DataFrame
# IO
pd.csv # pd.read_csv
pd.json # pd.read_json
pd.parquet # pd.read_parquet
pd.sql # pd.read_sql
pd.xlsx # pd.read_excel
# General function - Pivot
pd.pv # pd.pivot
pd.pvt # pd.pivot_table
# General function - datetime
pd.tdt # pd.to_datetime
pd.ttd # pd.to_timedelta
```
</details>
<details>
<summary><b><i><font size="3">
Dataframe API
</font></i></b></summary>
```Python
# Reindexing / selection / label manipulation
df.f2 # df.rename
## Heads or tails
df.h # df.head
df.t # df.tail
## Duplicates
df.dd # df.drop_duplicates
df.dup # df.duplicated
## Index
df.sx # df.set_index
df.rx # df.reset_index
# Reshaping, Sorting, Transposing
## Sort
df.si # df.sort_index
df.sv # df.sort_values
## Pivot
df.pv # df.pivot
df.pvt # df.pivot_table
# Groupby
df.gb # df.groupby
# Missing data handling
df.dna # df.dropna
df.fna # df.fillna
# Computations / descriptive stats
df.desc # df.describe
df.vc # df.cv # df.value_counts
df.nu # df.nunique
# Properties
df.c # df.columns
df.i # df.index
# IO
df.cb # df.to_clipboard
df.dict # df.to_dict
df.np # df.to_numpy
## File types
df.csv # df.to_csv
df.html # df.to_html
df.json # df.to_json
df.md # df.to_markdown
df.parquet # df.to_parquet
df.xlsx # df.to_excel
```
</details>
<details>
<summary><b><i><font size="3">
Series API
</font></i></b></summary>
```Python
# Reindexing / selection / label manipulation
## Heads or tails
df["col"].h # df["col"].head
df["col"].t # df["col"].tail
## Duplicates
df["col"].dd # df["col"].drop_duplicates
df["col"].dup # df["col"].duplicated
## Index
df["col"].rx # df["col"].reset_index
# Reshaping, Sorting, Transposing
## Sort
df["col"].si # df["col"].sort_index
df["col"].sv # df["col"].sort_values
# Groupby
df["col"].gb # df["col"].groupby
# Missing data handling
df["col"].dna # df["col"].dropna
df["col"].fna # df["col"].fillna
# Computations / descriptive stats
df["col"].vc # df["col"].cv # df["col"].value_counts
df["col"].nu # df["col"].nunique
df["col"].u # df["col"].unique
# Properties
df["col"].i # df["col"].index
# IO
df["col"].cb # df["col"].to_clipboard
df["col"].dict # df["col"].to_dict
df["col"].list # df["col"].to_list
df["col"].np # df["col"].to_numpy
## File types
df["col"].csv # df["col"].to_csv
df["col"].json # df["col"].to_json
df["col"].md # df["col"].to_markdown
df["col"].xlsx # df["col"].to_excel
```
</details>
<details>
<summary><b><i><font size="3">
Methods
</font></i></b></summary>
```Python
df.sh # style_heatmap
df.sb # style_bar
df.v # dataframe_view
df["col"].v # series_view
```
</details>
Raw data
{
"_id": null,
"home_page": null,
"name": "pandas-shortcuts",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "shortcut, pandas",
"author": null,
"author_email": "BaoGiang HoangVu <hoangvubaogiang@gmail.com>, lpun-majessica <nhi.lpu1205@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/c9/ab/ba0145b04640b4aabbba5388e0d37806c1ec12c73c1c2ff5d34251a4e238/pandas_shortcuts-0.1.tar.gz",
"platform": null,
"description": "<h1 align=\"center\">pandas-shortcuts</h1>\r\n\r\n<p align=\"center\">Why even wait for autocompletion when you can use <code>pandas_shortcuts</code>?\r\n</p>\r\n\r\n<p align=\"center\">\r\n<a href=\"https://github.com/baogianghoangvu\"><img src=\"https://img.shields.io/static/v1?logo=github&label=maintainer&message=baogianghoangvu&color=violet\"></a>\r\n<a href=\"https://github.com/lpun-majessica\"><img src=\"https://img.shields.io/static/v1?logo=github&label=co-maintainer&message=lpun-majessica&color=3EAAAF\"></a>\r\n</p>\r\n<p align=\"center\">\r\n<a href=\"https://github.com/baogianghoangvu/pandas-shortcuts/blob/main/pandas_shortcuts/__init__.py\"><img src=\"https://img.shields.io/badge/version-0.1-informational\"></a>\r\n<a href=\"https://github.com/python/cpython\"><img src=\"https://img.shields.io/badge/python->=3.6-important\"></a>\r\n<a href=\"https://github.com/psf/black\"><img src=\"https://img.shields.io/badge/code%20style-black-black\"></a>\r\n</p>\r\n\r\n## How to use\r\n\r\n- Simply import `pandas_shortcuts` together with `pandas`.\r\n\r\n ```Python\r\n import pandas as pd\r\n import pandas_shortcuts\r\n ```\r\n\r\n- Every `pd.DataFrame` and `pd.Series` objects will have:\r\n\r\n - Shortcuts (full list [below](#available-shortcuts-and-methods))\r\n\r\n ```Python\r\n # shortcut for `df.head()`\r\n df.h()\r\n\r\n # shortcut for df.columns\r\n df.c\r\n\r\n # shortcut for df[\"col\"].unique()\r\n df[\"col\"].u()\r\n ```\r\n\r\n - New methods (full list [below](#available-shortcuts-and-methods))\r\n\r\n ```Python\r\n # view up to `r` rows and `c` columns of a dataframe, overriding pandas' default limit\r\n df.v() # default r=50, c=50\r\n\r\n # view up to `r` rows of a series, overriding pandas' default limit\r\n df[\"col\"].v(100)\r\n\r\n # stylize a dataframe's numeric columns as heatmap or bars\r\n # view up to `r` rows and `c` of a dataframe, overriding pandas' default limit\r\n df.sh() # style=heatmap\r\n df.sb() # style=bar\r\n ```\r\n\r\n## Note\r\n\r\n- `df.v()` directly generates `IPython.core.display.HTML` object under the hood, thus completely bypassing any `pd.set_option(\"display.max_rows\", ...)` and `pd.set_option(\"display.max_columns\", ...)` that the user may have specified.\r\n\r\n## Available Shortcuts and Methods\r\n\r\n<details>\r\n<summary><b><i><font size=\"3\">\r\nTop Level API\r\n</font></i></b></summary>\r\n\r\n```Python\r\npd.df # pd.DataFrame\r\n\r\n# IO\r\npd.csv # pd.read_csv\r\npd.json # pd.read_json\r\npd.parquet # pd.read_parquet\r\npd.sql # pd.read_sql\r\npd.xlsx # pd.read_excel\r\n\r\n\r\n# General function - Pivot\r\npd.pv # pd.pivot\r\npd.pvt # pd.pivot_table\r\n\r\n\r\n# General function - datetime\r\npd.tdt # pd.to_datetime\r\npd.ttd # pd.to_timedelta\r\n```\r\n</details>\r\n\r\n<details>\r\n<summary><b><i><font size=\"3\">\r\nDataframe API\r\n</font></i></b></summary>\r\n\r\n```Python\r\n# Reindexing / selection / label manipulation\r\n\r\ndf.f2 # df.rename\r\n\r\n## Heads or tails\r\ndf.h # df.head\r\ndf.t # df.tail\r\n\r\n## Duplicates\r\ndf.dd # df.drop_duplicates\r\ndf.dup # df.duplicated\r\n\r\n## Index\r\ndf.sx # df.set_index\r\ndf.rx # df.reset_index\r\n\r\n# Reshaping, Sorting, Transposing\r\n\r\n## Sort\r\ndf.si # df.sort_index\r\ndf.sv # df.sort_values\r\n\r\n## Pivot\r\ndf.pv # df.pivot\r\ndf.pvt # df.pivot_table\r\n\r\n# Groupby\r\ndf.gb # df.groupby\r\n\r\n# Missing data handling\r\ndf.dna # df.dropna\r\ndf.fna # df.fillna\r\n\r\n# Computations / descriptive stats\r\ndf.desc # df.describe\r\ndf.vc # df.cv # df.value_counts\r\ndf.nu # df.nunique\r\n\r\n# Properties\r\ndf.c # df.columns\r\ndf.i # df.index\r\n\r\n# IO\r\ndf.cb # df.to_clipboard\r\ndf.dict # df.to_dict\r\ndf.np # df.to_numpy\r\n\r\n## File types\r\ndf.csv # df.to_csv\r\ndf.html # df.to_html\r\ndf.json # df.to_json\r\ndf.md # df.to_markdown\r\ndf.parquet # df.to_parquet\r\ndf.xlsx # df.to_excel\r\n```\r\n</details>\r\n\r\n<details>\r\n<summary><b><i><font size=\"3\">\r\nSeries API\r\n</font></i></b></summary>\r\n\r\n```Python\r\n# Reindexing / selection / label manipulation\r\n\r\n## Heads or tails\r\ndf[\"col\"].h # df[\"col\"].head\r\ndf[\"col\"].t # df[\"col\"].tail\r\n\r\n## Duplicates\r\ndf[\"col\"].dd # df[\"col\"].drop_duplicates\r\ndf[\"col\"].dup # df[\"col\"].duplicated\r\n\r\n## Index\r\ndf[\"col\"].rx # df[\"col\"].reset_index\r\n\r\n# Reshaping, Sorting, Transposing\r\n\r\n## Sort\r\ndf[\"col\"].si # df[\"col\"].sort_index\r\ndf[\"col\"].sv # df[\"col\"].sort_values\r\n\r\n# Groupby\r\ndf[\"col\"].gb # df[\"col\"].groupby\r\n\r\n# Missing data handling\r\ndf[\"col\"].dna # df[\"col\"].dropna\r\ndf[\"col\"].fna # df[\"col\"].fillna\r\n\r\n# Computations / descriptive stats\r\ndf[\"col\"].vc # df[\"col\"].cv # df[\"col\"].value_counts\r\ndf[\"col\"].nu # df[\"col\"].nunique\r\ndf[\"col\"].u # df[\"col\"].unique\r\n\r\n# Properties\r\ndf[\"col\"].i # df[\"col\"].index\r\n\r\n# IO\r\ndf[\"col\"].cb # df[\"col\"].to_clipboard\r\ndf[\"col\"].dict # df[\"col\"].to_dict\r\ndf[\"col\"].list # df[\"col\"].to_list\r\ndf[\"col\"].np # df[\"col\"].to_numpy\r\n\r\n## File types\r\ndf[\"col\"].csv # df[\"col\"].to_csv\r\ndf[\"col\"].json # df[\"col\"].to_json\r\ndf[\"col\"].md # df[\"col\"].to_markdown\r\ndf[\"col\"].xlsx # df[\"col\"].to_excel\r\n```\r\n</details>\r\n\r\n<details>\r\n<summary><b><i><font size=\"3\">\r\nMethods\r\n</font></i></b></summary>\r\n\r\n```Python\r\ndf.sh # style_heatmap\r\ndf.sb # style_bar\r\ndf.v # dataframe_view\r\ndf[\"col\"].v # series_view\r\n```\r\n</details>\r\n\r\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2021 BaoGiang HoangVu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Why even wait for autocompletion when you can use `pandas_shortcuts`?",
"version": "0.1",
"project_urls": {
"Bug Reports": "https://github.com/baogianghoangvu/pandas-shortcuts/issues",
"Source": "https://github.com/baogianghoangvu/pandas-shortcuts"
},
"split_keywords": [
"shortcut",
" pandas"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "19209f270bbe41b34b9294189497037055cae9e470ce7dd3c4ce40182fb7b896",
"md5": "273497e49f0271bfc7db14a2ce46e4c0",
"sha256": "f66466a38c0553293321162d4f2e650246696dcc6336aaed1fb5e3afff5df2bf"
},
"downloads": -1,
"filename": "pandas_shortcuts-0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "273497e49f0271bfc7db14a2ce46e4c0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 7249,
"upload_time": "2024-07-24T07:47:01",
"upload_time_iso_8601": "2024-07-24T07:47:01.133854Z",
"url": "https://files.pythonhosted.org/packages/19/20/9f270bbe41b34b9294189497037055cae9e470ce7dd3c4ce40182fb7b896/pandas_shortcuts-0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c9abba0145b04640b4aabbba5388e0d37806c1ec12c73c1c2ff5d34251a4e238",
"md5": "9ee29ef5c0043da75d9551f11be291b1",
"sha256": "a3d739a97808240305d7d9882b00b32800828dd1eaa53a3e86438c31e0d176a5"
},
"downloads": -1,
"filename": "pandas_shortcuts-0.1.tar.gz",
"has_sig": false,
"md5_digest": "9ee29ef5c0043da75d9551f11be291b1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 6321,
"upload_time": "2024-07-24T07:47:02",
"upload_time_iso_8601": "2024-07-24T07:47:02.653106Z",
"url": "https://files.pythonhosted.org/packages/c9/ab/ba0145b04640b4aabbba5388e0d37806c1ec12c73c1c2ff5d34251a4e238/pandas_shortcuts-0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-24 07:47:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "baogianghoangvu",
"github_project": "pandas-shortcuts",
"travis_ci": false,
"coveralls": true,
"github_actions": false,
"requirements": [
{
"name": "numpy",
"specs": []
},
{
"name": "pandas",
"specs": []
}
],
"lcname": "pandas-shortcuts"
}