new_pandas_column_GUI()
¶You can try this notebook live by lauching it in Binder.This can take a while to launch, be patient. .
First we import pandas
and pandas_GUI
, and make a dataframe. In this case we will make an X
column with numbers between -12.8 and +12.8.
import pandas as pd
from pandas_GUI import *
df = pd.DataFrame({'X':[i/10 for i in range(-128,128)]})
The steps below were done after running the command new_pandas_column_GUI()
in an empty code cell. If you are running this notebook live you can try it yourself by running all the cells in the notebook. The last one runs the new_pandas_column_GUI()
command, so will create a live GUI for you to try.
Which dataframe to add the column to was chosen as shown in the image below:
A name is typed in the textbox for the new column and the insert
button is clicked. This starts building the statement for creating the new column in the code cell immediately below the GUI as shown in the image below.
There are two popup menus for selecting expression fragments to insert into the expression at the current cursor position.
sin()
from the Operation
popup.The following options are available in the Operations
popup: +, -, $*$, /, $**$, exp(), $log_{10}$, ln, sqrt(), sin, cos, tan, cot, asin, acos, atan, and acot.
Column
popup was used to select the X
column to insert into the sine function as the values it operates on. See the image below.The list of suggestions of things to check should be followed before clicking the "Do It!" button. If you do not want a table of the dataframe displayed uncheck that option. When "Do It!" is clicked any imports necessary to do the calculations will be added to the cell, the GUI will destroy itself and the cell to add the new column will be run. The image below is a snapshot of the fourth tab.
The code created at the end is show below.
plot_pandas_GUI()
(see plotting examples on the Pandas GUI website).¶In addition to trying it below if this is a live notebook, you can look at the other examples listed in the Pandas GUI website.
If you are running this notebook live in binder you can try it here by running the first cell to import the tools and make the initial data column. Then run the cell below to create the GUI.
new_pandas_column_GUI()