# Pandas_GUI (aka: jupyter_Pandas_GUI)
[Introduction](#introduction) | [Current Features](#current-features) |
[Wishlist](#wishlist) | [Usage](#usage) | [Installation](#installation) |
[Change Log](#change-log) | [Issues or comments](#issues-or-comments) |
[License](#this-software-is-distributed-under-the-gnu-v3-license) |
[PyPi link](https://pypi.org/project/jupyter-Pandas-GUI/)
**[Documentation / Website
](https://jupyterphysscilab.github.io/jupyter_Pandas_GUI/)**
## Introduction:
This package provides GUI tools to help the user construct Pandas and Python
expressions
to create things such as new calculated columns, plots or fits. The tools are
meant to run in an interactive Jupyter notebook in
[classic Jupyter](https://jupyter-notebook.readthedocs.io/en/latest/),
[Jupyter Lab](https://jupyterlab.readthedocs.io/en/stable/)
and [Google Colab](https://colab.research.google.com/). All tools are based on ipywidgets widgets.
These tools are meant to help the user learn how to construct the commands.
They are intended for new or occasional users of Pandas. However,
sophisticated users may find them useful for doing simple one-off tasks where
the ability to choose python objects from menus can reduce errors.
## Current Features:
The user can pass the GUI tools a list of Pandas
DataFrames to work with. If nothing is passed, the GUI will look for
Pandas DataFrames in the interactive session. In classic Jupyter the whole GUI
and the Jupyter cell that created it are deleted when done. This leaves
only the code that was generated by the GUI and the results of running the
generated code. In Colab and Lab the code is generated in an editable text
box. In Lab it can be run by clicking a button. In Colab it is best to copy
the code into a new cell before running it.
The generated code contains comments meant to help new users
understand the code.
*Currently defined GUIs:*
* `new_pandas_column_GUI()`: A GUI with four steps to lead the user through
formulating an expression for a new column.
<img src = "https://jupyterphysscilab.github.io/jupyter_Pandas_GUI/DataSets/new_col_GUI.png" style="width:90%;"/>
* `plot_pandas_GUI()`: A GUI with four steps to lead the user through plotting
Pandas data as a scatter or line plot using plotly.
<img src = "https://jupyterphysscilab.github.io/jupyter_Pandas_GUI/DataSets/plot_GUI.png" style="width:90%;"/>
* `fit_pandas_GUI()`: A GUI with six steps to lead the user through fitting
Pandas data to a line, polynomial, exponential, Gaussian or sine function.
**Selecting regions of the data set to fit does NOT currently
work in Colab**.
<img src = "https://jupyterphysscilab.github.io/jupyter_Pandas_GUI/DataSets/GUI_fitexp_1.png" style="width:90%;"/>
## Wishlist:
* GUIs for plots beyond scatter/line plots.
## Usage:
If the `jupyter_Pandas_GUI` is installed in your Jupyter/Python environment
start by importing it:
```
from pandas_GUI import *
```
When you want to use a particular GUI issue the appropriate command. Currently:
```
new_pandas_column_GUI()
```
or
```
plot_pandas_GUI()
```
or
```
fit_pandas_GUI()
```
See the [documentation
](https://jupyterphysscilab.github.io/jupyter_Pandas_GUI/) for examples,
more details and information about passing dataframes that are not at the
root of the interactive namespace or presenting the user with alternative names
for the dataframes. There is also an option to make columns containing text
available. By default they are ignored.
## Installation:
Installation using pip into a virtual environment is recommended.
*Production*
1. If not installed, install pipenv:`$ pip3 install --user pipenv`, or your
favorite environment management system. You may
need to add `~/.local/bin` to your `PATH` to make `pipenv`
available in your command shell. More discussion:
[The Hitchhiker's Guide to Python](https://docs.python-guide.org/dev/virtualenvs/).
1. Navigate to the directory where this package will be installed.
1. Start a shell in the environment `$ pipenv shell`.
1. Install using pip.
1. `pip install jupyter-Pandas-GUI`. This will install
Jupyter into the same virtual
environment if you do not already have it on your machine. If Jupyter is already
installed the virtual environment will use the existing installation. This takes
a long time on a Raspberry Pi 3B+ or older. It will not run on a 3B+
without at least 1 GB of swap. See: [Build Jupyter on a Pi
](https://cms.gutow.uwosh.edu/Gutow/useful-chemistry-links/software-tools-and-coding/computer-and-coding-how-tos/installing-jupyter-on-raspberrian).
2. Still within the environment shell test this by starting jupyter
`jupyter notebook` or `Jupyter lab`. The version of Jupyter requested should
launch in your browser.
1. Open a new notebook using the default (Python 3) kernel.
1. In the first cell import the pandas_GUI module:
`from pandas_GUI import *`
1. To try:
1. Create some Pandas DataFrames in the notebook.
1. Use the command `new_pandas_column_GUI()` to start the GUI.
1. It will search for the DataFrames you created.
1. Follow the steps to create a new column in one of your
DataFrames.
1. _Optional_ You can make this environment available to an alternate Jupyter install as a special kernel when you are the user.
1. Make sure you are running in your virtual environment `$ pipenv shell` in the directory for virtual
environment will do that.
1. Issue the command to add this as a kernel to your personal space:
`$ python -m ipykernel install --user --name=<name-you-want-for-kernel>`.
1. More information is available in the Jupyter/Ipython documentation. A simple tutorial from Nikolai Jankiev
(_Parametric Thoughts_) can be found [here](https://janakiev.com/til/jupyter-virtual-envs/).
*Development*
Simply replace `$ pip install jupyter-Pandas-GUI` with `$ pip
install -e ../jupyter_Pandas_GUI` in the _Production_
instructions.
## Change Log
* 0.9.0.dev (2024-3-)
* NEW Feature: plot and fit GUIs allow controlling aspect ratio and size
of figure.
* NEW Feature: default format for plotly download (camera in modebar) is
now SVG. If users want a png, they can use a screenshot.
* BUG Fix: colored text in LaTex not rendering properly. Use of backslash for
escaping unreliable. Switched to using Python raw strings where possible
and more careful use of "{}" to indicate range of LaTex expression to color.
* Improved initial guess for fitting to sine wave using FFT.
* Improved initial guess for fitting a Gaussian.
* Made more robust to running with packages that can use the IPython
preparser to cast Python integers to specialized types (e.g. Sympy &
Algebra_with_Sympy), by wrapping integers with `int()` in generated code.
Added comments to generated code explaining this.
* Removed statements from generated code for NBClassic that did nothing
because of asynchronicity of javascript and python.
* Updated allowable versions of packages.
* Documentation updates to reflect changes.
* 0.8.0 (2023-6-21)
* In Jupyter Lab results of running code now replace the GUI rather than
appearing in the Console.
* Colab behavior has been inconsistent. To avoid problems for the time being
the user is required to copy the code from the textbox it is created in
and paste it into an empty code cell to run it.
* BUG FIX: collapsed "code that was run" box in Lab now keeps raw html
codes, so when copied and pasted output formatting is maintained.
* Changes to avoid warnings caused by JSON having no representation for
floating point infinity and not-a-number.
* Requirements updates to reflect changes in the Jupyter ecosystem.
* Documentation updates to reflect changes.
* 0.7.1 (2022-12-18)
* Documentation fixes and link updates for mybinder.org launches.
* Updates to requirements.
* 0.7.0
* GUIs now also work in Jupyter Lab and Google Colab, although less
elegently than in classic Jupyter. Only the fit range selection tab
does not yet work in Google Colab.
* Some minor bug fixes and clarification of instructions.
* More and better comments in generated code.
* Replacement of notebook cell javascript tools with those from JPSLUtils
is complete.
* 0.6.2.1 Fix for python move of `Iterable` to `collections.abc`
* 0.6.2
* Can now pass dataframes to the GUIs and they will search for additional
dataframes in the user namespace. Search can be turned off.
* Fixed edge case where GUI fit range picking did nothing.
* 0.6.1 fixed `fit_pandas_GUI()` mishandling of user friendly names for the
data frames.
* 0.6.0
* Documentation (Examples and API).
* Addition of fitting GUI.
* Minor bug and typo fixes.
* Images show up on Pypi page.
* 0.5.2
* Widget states autosaved when a new plot is made.
* Began making use of [JPSLUtils](https://github.com/JupyterPhysSciLab/JPSLUtils).
* 0.5.1
* Possible to use pandas dataframes in namespaces other than the
user global namespace.
* Readme updates.
* 0.5.0 Initial beta release.
## Issues or comments
[JupyterPhysSciLab/jupyter_Pandas_GUI/issues](https://github.com/JupyterPhysSciLab/jupyter_Pandas_GUI/issues)
### Known issues
* In Google Colabratory images in point styles buttons do not show up. This
is a related to a known [issue with
Colab](https://github.com/googlecolab/colabtools/issues/1302). Fix will
depend on updates to Colab.
* In Google Colabratory typset rendering of Latex in widgets is hit or miss.
It works most of the time in regular outputs and for plots.
## [This software is distributed under the GNU V3 license](https://gnu.org/licenses)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Copyright - Jonathan Gutow, 2021, 2022.
Raw data
{
"_id": null,
"home_page": "https://jupyterphysscilab.github.io/jupyter_Pandas_GUI/",
"name": "jupyter-Pandas-GUI",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "fitting, data-analysis, plotting, learning to code",
"author": "Jonathan Gutow",
"author_email": "gutow@uwosh.edu",
"download_url": "https://files.pythonhosted.org/packages/7b/df/eb3d20b313163ec360d120ec35a27d81df64fccc4c0b47444880a4a3a823/jupyter_Pandas_GUI-0.9.0.tar.gz",
"platform": null,
"description": "# Pandas_GUI (aka: jupyter_Pandas_GUI)\n\n[Introduction](#introduction) | [Current Features](#current-features) | \n[Wishlist](#wishlist) | [Usage](#usage) | [Installation](#installation) | \n[Change Log](#change-log) | [Issues or comments](#issues-or-comments) | \n[License](#this-software-is-distributed-under-the-gnu-v3-license) |\n[PyPi link](https://pypi.org/project/jupyter-Pandas-GUI/)\n\n**[Documentation / Website\n](https://jupyterphysscilab.github.io/jupyter_Pandas_GUI/)**\n\n## Introduction:\n\nThis package provides GUI tools to help the user construct Pandas and Python \nexpressions \nto create things such as new calculated columns, plots or fits. The tools are \nmeant to run in an interactive Jupyter notebook in \n[classic Jupyter](https://jupyter-notebook.readthedocs.io/en/latest/), \n[Jupyter Lab](https://jupyterlab.readthedocs.io/en/stable/) \nand [Google Colab](https://colab.research.google.com/). All tools are based on ipywidgets widgets.\n\nThese tools are meant to help the user learn how to construct the commands. \nThey are intended for new or occasional users of Pandas. However, \nsophisticated users may find them useful for doing simple one-off tasks where \nthe ability to choose python objects from menus can reduce errors.\n\n## Current Features:\n\nThe user can pass the GUI tools a list of Pandas \nDataFrames to work with. If nothing is passed, the GUI will look for \nPandas DataFrames in the interactive session. In classic Jupyter the whole GUI \nand the Jupyter cell that created it are deleted when done. This leaves \nonly the code that was generated by the GUI and the results of running the\ngenerated code. In Colab and Lab the code is generated in an editable text \nbox. In Lab it can be run by clicking a button. In Colab it is best to copy \nthe code into a new cell before running it.\n\nThe generated code contains comments meant to help new users \nunderstand the code.\n\n*Currently defined GUIs:*\n\n* `new_pandas_column_GUI()`: A GUI with four steps to lead the user through \n formulating an expression for a new column.\n\n <img src = \"https://jupyterphysscilab.github.io/jupyter_Pandas_GUI/DataSets/new_col_GUI.png\" style=\"width:90%;\"/>\n \n* `plot_pandas_GUI()`: A GUI with four steps to lead the user through plotting \n Pandas data as a scatter or line plot using plotly.\n\n <img src = \"https://jupyterphysscilab.github.io/jupyter_Pandas_GUI/DataSets/plot_GUI.png\" style=\"width:90%;\"/>\n \n* `fit_pandas_GUI()`: A GUI with six steps to lead the user through fitting \n Pandas data to a line, polynomial, exponential, Gaussian or sine function.\n **Selecting regions of the data set to fit does NOT currently\n work in Colab**.\n\n <img src = \"https://jupyterphysscilab.github.io/jupyter_Pandas_GUI/DataSets/GUI_fitexp_1.png\" style=\"width:90%;\"/>\n\n## Wishlist:\n\n * GUIs for plots beyond scatter/line plots.\n \n## Usage:\nIf the `jupyter_Pandas_GUI` is installed in your Jupyter/Python environment \nstart by importing it:\n```\nfrom pandas_GUI import *\n```\nWhen you want to use a particular GUI issue the appropriate command. Currently:\n```\nnew_pandas_column_GUI()\n```\nor\n```\nplot_pandas_GUI()\n```\nor\n```\nfit_pandas_GUI()\n```\nSee the [documentation\n](https://jupyterphysscilab.github.io/jupyter_Pandas_GUI/) for examples,\nmore details and information about passing dataframes that are not at the\nroot of the interactive namespace or presenting the user with alternative names\nfor the dataframes. There is also an option to make columns containing text \navailable. By default they are ignored.\n\n\n## Installation:\n\nInstallation using pip into a virtual environment is recommended.\n\n*Production*\n\n1. If not installed, install pipenv:`$ pip3 install --user pipenv`, or your \n favorite environment management system. You may\n need to add `~/.local/bin` to your `PATH` to make `pipenv`\n available in your command shell. More discussion: \n[The Hitchhiker's Guide to Python](https://docs.python-guide.org/dev/virtualenvs/).\n1. Navigate to the directory where this package will be installed.\n1. Start a shell in the environment `$ pipenv shell`.\n1. Install using pip.\n 1. `pip install jupyter-Pandas-GUI`. This will install \n Jupyter into the same virtual\n environment if you do not already have it on your machine. If Jupyter is already\n installed the virtual environment will use the existing installation. This takes\n a long time on a Raspberry Pi 3B+ or older. It will not run on a 3B+ \n without at least 1 GB of swap. See: [Build Jupyter on a Pi\n ](https://cms.gutow.uwosh.edu/Gutow/useful-chemistry-links/software-tools-and-coding/computer-and-coding-how-tos/installing-jupyter-on-raspberrian).\n 2. Still within the environment shell test this by starting jupyter\n`jupyter notebook` or `Jupyter lab`. The version of Jupyter requested should \n launch in your browser.\n 1. Open a new notebook using the default (Python 3) kernel.\n 1. In the first cell import the pandas_GUI module:\n `from pandas_GUI import *`\n 1. To try:\n 1. Create some Pandas DataFrames in the notebook.\n 1. Use the command `new_pandas_column_GUI()` to start the GUI.\n 1. It will search for the DataFrames you created.\n 1. Follow the steps to create a new column in one of your\n DataFrames.\n \n1. _Optional_ You can make this environment available to an alternate Jupyter install as a special kernel when you are the user.\n 1. Make sure you are running in your virtual environment `$ pipenv shell` in the directory for virtual\n environment will do that.\n 1. Issue the command to add this as a kernel to your personal space: \n `$ python -m ipykernel install --user --name=<name-you-want-for-kernel>`.\n 1. More information is available in the Jupyter/Ipython documentation. A simple tutorial from Nikolai Jankiev\n (_Parametric Thoughts_) can be found [here](https://janakiev.com/til/jupyter-virtual-envs/). \n \n*Development*\n\nSimply replace `$ pip install jupyter-Pandas-GUI` with `$ pip \ninstall -e ../jupyter_Pandas_GUI` in the _Production_\ninstructions.\n\n## Change Log\n* 0.9.0.dev (2024-3-)\n * NEW Feature: plot and fit GUIs allow controlling aspect ratio and size \n of figure.\n * NEW Feature: default format for plotly download (camera in modebar) is \n now SVG. If users want a png, they can use a screenshot.\n * BUG Fix: colored text in LaTex not rendering properly. Use of backslash for \n escaping unreliable. Switched to using Python raw strings where possible\n and more careful use of \"{}\" to indicate range of LaTex expression to color.\n * Improved initial guess for fitting to sine wave using FFT.\n * Improved initial guess for fitting a Gaussian.\n * Made more robust to running with packages that can use the IPython \n preparser to cast Python integers to specialized types (e.g. Sympy & \n Algebra_with_Sympy), by wrapping integers with `int()` in generated code.\n Added comments to generated code explaining this.\n * Removed statements from generated code for NBClassic that did nothing \n because of asynchronicity of javascript and python.\n * Updated allowable versions of packages.\n * Documentation updates to reflect changes.\n* 0.8.0 (2023-6-21)\n * In Jupyter Lab results of running code now replace the GUI rather than \n appearing in the Console.\n * Colab behavior has been inconsistent. To avoid problems for the time being \n the user is required to copy the code from the textbox it is created in \n and paste it into an empty code cell to run it.\n * BUG FIX: collapsed \"code that was run\" box in Lab now keeps raw html \n codes, so when copied and pasted output formatting is maintained.\n * Changes to avoid warnings caused by JSON having no representation for \n floating point infinity and not-a-number.\n * Requirements updates to reflect changes in the Jupyter ecosystem.\n * Documentation updates to reflect changes.\n* 0.7.1 (2022-12-18)\n * Documentation fixes and link updates for mybinder.org launches.\n * Updates to requirements.\n* 0.7.0\n * GUIs now also work in Jupyter Lab and Google Colab, although less \n elegently than in classic Jupyter. Only the fit range selection tab \n does not yet work in Google Colab.\n * Some minor bug fixes and clarification of instructions.\n * More and better comments in generated code.\n * Replacement of notebook cell javascript tools with those from JPSLUtils \n is complete.\n* 0.6.2.1 Fix for python move of `Iterable` to `collections.abc`\n* 0.6.2\n * Can now pass dataframes to the GUIs and they will search for additional \n dataframes in the user namespace. Search can be turned off.\n * Fixed edge case where GUI fit range picking did nothing.\n* 0.6.1 fixed `fit_pandas_GUI()` mishandling of user friendly names for the \n data frames.\n* 0.6.0\n * Documentation (Examples and API).\n * Addition of fitting GUI.\n * Minor bug and typo fixes.\n * Images show up on Pypi page.\n* 0.5.2 \n * Widget states autosaved when a new plot is made.\n * Began making use of [JPSLUtils](https://github.com/JupyterPhysSciLab/JPSLUtils). \n* 0.5.1\n * Possible to use pandas dataframes in namespaces other than the\n user global namespace.\n * Readme updates.\n* 0.5.0 Initial beta release.\n\n## Issues or comments\n\n[JupyterPhysSciLab/jupyter_Pandas_GUI/issues](https://github.com/JupyterPhysSciLab/jupyter_Pandas_GUI/issues)\n\n### Known issues\n* In Google Colabratory images in point styles buttons do not show up. This \n is a related to a known [issue with\n Colab](https://github.com/googlecolab/colabtools/issues/1302). Fix will \n depend on updates to Colab.\n* In Google Colabratory typset rendering of Latex in widgets is hit or miss.\n It works most of the time in regular outputs and for plots. \n\n## [This software is distributed under the GNU V3 license](https://gnu.org/licenses)\nThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\nCopyright - Jonathan Gutow, 2021, 2022.\n",
"bugtrack_url": null,
"license": "GPL-3.0+",
"summary": "Pandas expression composers using Jupyter widgets.",
"version": "0.9.0",
"project_urls": {
"Homepage": "https://jupyterphysscilab.github.io/jupyter_Pandas_GUI/"
},
"split_keywords": [
"fitting",
" data-analysis",
" plotting",
" learning to code"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "05187318ce104ad4dd25b9fddb632afb854915f0ac3f75bd0f8aaec105e5e220",
"md5": "e4a1b8d81a8aaa62cac635cc094067f6",
"sha256": "73893f46493e3c7cb5f7c21e327333decaac455eb12c721c4f2a6dd5a4299129"
},
"downloads": -1,
"filename": "jupyter_Pandas_GUI-0.9.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e4a1b8d81a8aaa62cac635cc094067f6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 45668,
"upload_time": "2024-04-01T01:04:42",
"upload_time_iso_8601": "2024-04-01T01:04:42.550657Z",
"url": "https://files.pythonhosted.org/packages/05/18/7318ce104ad4dd25b9fddb632afb854915f0ac3f75bd0f8aaec105e5e220/jupyter_Pandas_GUI-0.9.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7bdfeb3d20b313163ec360d120ec35a27d81df64fccc4c0b47444880a4a3a823",
"md5": "29c95ab26423750e0e36dc81f6f16b7a",
"sha256": "7e313b25d4d9c00f7bad02fa22a580c4ead8c43e81d34c057937e041c80aed88"
},
"downloads": -1,
"filename": "jupyter_Pandas_GUI-0.9.0.tar.gz",
"has_sig": false,
"md5_digest": "29c95ab26423750e0e36dc81f6f16b7a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 42531,
"upload_time": "2024-04-01T01:04:45",
"upload_time_iso_8601": "2024-04-01T01:04:45.656105Z",
"url": "https://files.pythonhosted.org/packages/7b/df/eb3d20b313163ec360d120ec35a27d81df64fccc4c0b47444880a4a3a823/jupyter_Pandas_GUI-0.9.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-01 01:04:45",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "jupyter-pandas-gui"
}