Skip to content

Commit

Permalink
update to 0.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
hanjinliu committed Oct 1, 2023
1 parent 6262d7d commit ae5de8f
Show file tree
Hide file tree
Showing 86 changed files with 1,426 additions and 1,435 deletions.
2 changes: 1 addition & 1 deletion docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 881986699d41314cb3f09650b1e5fa82
config: 7a53ec4a914113731f8eaecd5b440f2c
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified docs/.doctrees/apidoc/modules.doctree
Binary file not shown.
Binary file modified docs/.doctrees/apidoc/tabulous.commands.doctree
Binary file not shown.
Binary file modified docs/.doctrees/apidoc/tabulous.doctree
Binary file not shown.
Binary file modified docs/.doctrees/apidoc/tabulous.style.doctree
Binary file not shown.
Binary file modified docs/.doctrees/apidoc/tabulous.widgets.doctree
Binary file not shown.
Binary file modified docs/.doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/.doctrees/font.doctree
Binary file not shown.
Binary file modified docs/.doctrees/index.doctree
Binary file not shown.
Binary file modified docs/.doctrees/main/cheat_sheet.doctree
Binary file not shown.
Binary file modified docs/.doctrees/main/columnwise_settings.doctree
Binary file not shown.
Binary file modified docs/.doctrees/main/customize.doctree
Binary file not shown.
Binary file modified docs/.doctrees/main/integrate_custom_widgets.doctree
Binary file not shown.
Binary file modified docs/.doctrees/main/non_mainwindow.doctree
Binary file not shown.
Binary file modified docs/.doctrees/main/quickstart.doctree
Binary file not shown.
Binary file modified docs/.doctrees/main/register_action.doctree
Binary file not shown.
Binary file modified docs/.doctrees/main/selections.doctree
Binary file not shown.
Binary file modified docs/.doctrees/main/sort_filter.doctree
Binary file not shown.
Binary file modified docs/.doctrees/main/table_fields.doctree
Binary file not shown.
Binary file modified docs/.doctrees/main/table_view_mode.doctree
Binary file not shown.
Binary file modified docs/.doctrees/main/user_interface.doctree
Binary file not shown.
Binary file modified docs/_images/cell_labels.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/colormap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/colormap_interpolate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/column_filter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/command_palette.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/dock_with_table_data_annotation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/edit_cell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/formatter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/spreadsheet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/table.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/tile_tables.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/validator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion docs/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
<![endif]-->

<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.js"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
Expand Down
9 changes: 7 additions & 2 deletions docs/_modules/tabulous/commands/analysis.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>tabulous.commands.analysis &mdash; tabulous 0.5.2 documentation</title>
<title>tabulous.commands.analysis &mdash; tabulous 0.5.4 documentation</title>
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/font.css" type="text/css" />
Expand Down Expand Up @@ -32,7 +32,7 @@
tabulous
</a>
<div class="version">
0.5.2
0.5.4
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
Expand Down Expand Up @@ -153,6 +153,11 @@ <h1>Source code for tabulous.commands.analysis</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">viewer</span><span class="o">.</span><span class="n">_qwidget</span><span class="o">.</span><span class="n">_tablestack</span><span class="o">.</span><span class="n">openFilterDialog</span><span class="p">()</span></div>


<div class="viewcode-block" id="show_column_filter_widget"><a class="viewcode-back" href="../../../apidoc/tabulous.commands.html#tabulous.commands.analysis.show_column_filter_widget">[docs]</a><span class="k">def</span> <span class="nf">show_column_filter_widget</span><span class="p">(</span><span class="n">viewer</span><span class="p">:</span> <span class="n">TableViewerBase</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Show column filter widget.&quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">viewer</span><span class="o">.</span><span class="n">_qwidget</span><span class="o">.</span><span class="n">_tablestack</span><span class="o">.</span><span class="n">openColumnFilterDialog</span><span class="p">()</span></div>


<div class="viewcode-block" id="show_eval_widget"><a class="viewcode-back" href="../../../apidoc/tabulous.commands.html#tabulous.commands.analysis.show_eval_widget">[docs]</a><span class="k">def</span> <span class="nf">show_eval_widget</span><span class="p">(</span><span class="n">viewer</span><span class="p">:</span> <span class="n">TableViewerBase</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Evaluate a Python expression&quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">viewer</span><span class="o">.</span><span class="n">_qwidget</span><span class="o">.</span><span class="n">_tablestack</span><span class="o">.</span><span class="n">openEvalDialog</span><span class="p">()</span></div>
Expand Down
9 changes: 5 additions & 4 deletions docs/_modules/tabulous/commands/selection.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>tabulous.commands.selection &mdash; tabulous 0.5.3 documentation</title>
<title>tabulous.commands.selection &mdash; tabulous 0.5.4 documentation</title>
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/font.css" type="text/css" />
Expand All @@ -12,8 +12,9 @@
<![endif]-->

<script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/sphinx_highlight.js"></script>
<script src="../../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
Expand All @@ -31,7 +32,7 @@
tabulous
</a>
<div class="version">
0.5.3
0.5.4
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
Expand Down Expand Up @@ -571,7 +572,7 @@ <h1>Source code for tabulous.commands.selection</h1><div class="highlight"><pre>


<div class="viewcode-block" id="filter_by_columns"><a class="viewcode-back" href="../../../apidoc/tabulous.commands.html#tabulous.commands.selection.filter_by_columns">[docs]</a><span class="k">def</span> <span class="nf">filter_by_columns</span><span class="p">(</span><span class="n">viewer</span><span class="p">:</span> <span class="n">TableViewerBase</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Filter by a column&quot;&quot;&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Filter by selected columns&quot;&quot;&quot;</span>
<span class="n">table</span> <span class="o">=</span> <span class="n">_utils</span><span class="o">.</span><span class="n">get_table</span><span class="p">(</span><span class="n">viewer</span><span class="p">)</span>
<span class="n">indices</span> <span class="o">=</span> <span class="n">_utils</span><span class="o">.</span><span class="n">get_selected_columns</span><span class="p">(</span><span class="n">viewer</span><span class="p">)</span>
<span class="n">by</span> <span class="o">=</span> <span class="p">[</span><span class="n">table</span><span class="o">.</span><span class="n">columns</span><span class="p">[</span><span class="n">index</span><span class="p">]</span> <span class="k">for</span> <span class="n">index</span> <span class="ow">in</span> <span class="n">indices</span><span class="p">]</span>
Expand Down
37 changes: 30 additions & 7 deletions docs/_modules/tabulous/commands/table.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>tabulous.commands.table &mdash; tabulous 0.5.3 documentation</title>
<title>tabulous.commands.table &mdash; tabulous 0.5.4 documentation</title>
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/font.css" type="text/css" />
Expand All @@ -12,8 +12,9 @@
<![endif]-->

<script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/sphinx_highlight.js"></script>
<script src="../../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
Expand All @@ -31,7 +32,7 @@
tabulous
</a>
<div class="version">
0.5.3
0.5.4
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
Expand Down Expand Up @@ -200,14 +201,36 @@ <h1>Source code for tabulous.commands.table</h1><div class="highlight"><pre>


<div class="viewcode-block" id="melt"><a class="viewcode-back" href="../../../apidoc/tabulous.commands.html#tabulous.commands.table.melt">[docs]</a><span class="k">def</span> <span class="nf">melt</span><span class="p">(</span><span class="n">viewer</span><span class="p">:</span> <span class="n">TableViewerBase</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Melt (unpivot) current table data (pd.melt)&quot;&quot;&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Melt (unpivot) current table data on selected columns if any (pd.melt)&quot;&quot;&quot;</span>
<span class="n">table</span> <span class="o">=</span> <span class="n">_utils</span><span class="o">.</span><span class="n">get_table</span><span class="p">(</span><span class="n">viewer</span><span class="p">)</span>
<span class="n">cols</span> <span class="o">=</span> <span class="n">_utils</span><span class="o">.</span><span class="n">get_selected_columns</span><span class="p">(</span><span class="n">viewer</span><span class="p">)</span>
<span class="n">cols</span> <span class="o">=</span> <span class="n">_utils</span><span class="o">.</span><span class="n">get_selected_columns</span><span class="p">(</span><span class="n">viewer</span><span class="p">,</span> <span class="n">assert_exists</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="n">df</span> <span class="o">=</span> <span class="n">table</span><span class="o">.</span><span class="n">data</span>
<span class="n">out</span> <span class="o">=</span> <span class="n">df</span><span class="o">.</span><span class="n">melt</span><span class="p">(</span><span class="n">id_vars</span><span class="o">=</span><span class="p">[</span><span class="n">df</span><span class="o">.</span><span class="n">columns</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">cols</span><span class="p">])</span>
<span class="n">table_out</span> <span class="o">=</span> <span class="n">viewer</span><span class="o">.</span><span class="n">add_table</span><span class="p">(</span><span class="n">out</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">table</span><span class="o">.</span><span class="n">name</span><span class="si">}</span><span class="s2">-melt&quot;</span><span class="p">)</span>
<span class="n">table_out</span><span class="o">.</span><span class="n">_source</span> <span class="o">=</span> <span class="n">Source</span><span class="o">.</span><span class="n">from_table</span><span class="p">(</span><span class="n">table</span><span class="p">)</span></div>


<div class="viewcode-block" id="map_values"><a class="viewcode-back" href="../../../apidoc/tabulous.commands.html#tabulous.commands.table.map_values">[docs]</a><span class="k">def</span> <span class="nf">map_values</span><span class="p">(</span><span class="n">viewer</span><span class="p">:</span> <span class="n">TableViewerBase</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Map values of selected column (pd.Series.map)&quot;&quot;&quot;</span>
<span class="kn">from</span> <span class="nn">magicgui.widgets</span> <span class="kn">import</span> <span class="n">request_values</span>

<span class="n">table</span> <span class="o">=</span> <span class="n">_utils</span><span class="o">.</span><span class="n">get_mutable_table</span><span class="p">(</span><span class="n">viewer</span><span class="p">)</span>
<span class="n">col</span> <span class="o">=</span> <span class="n">_utils</span><span class="o">.</span><span class="n">get_selected_column</span><span class="p">(</span><span class="n">viewer</span><span class="p">)</span>
<span class="n">df</span> <span class="o">=</span> <span class="n">table</span><span class="o">.</span><span class="n">data</span>
<span class="n">colname</span> <span class="o">=</span> <span class="n">df</span><span class="o">.</span><span class="n">columns</span><span class="p">[</span><span class="n">col</span><span class="p">]</span>
<span class="k">if</span> <span class="n">table</span><span class="o">.</span><span class="n">table_type</span> <span class="o">==</span> <span class="s2">&quot;Table&quot;</span> <span class="ow">and</span> <span class="n">df</span><span class="o">.</span><span class="n">dtypes</span><span class="p">[</span><span class="n">colname</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;object&quot;</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;Cannot map values of object type.&quot;</span><span class="p">)</span>
<span class="n">ser</span> <span class="o">=</span> <span class="n">df</span><span class="p">[</span><span class="n">colname</span><span class="p">]</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="nb">str</span><span class="p">)</span>
<span class="n">unique_values</span> <span class="o">=</span> <span class="n">ser</span><span class="o">.</span><span class="n">unique</span><span class="p">()</span>
<span class="k">if</span> <span class="n">unique_values</span><span class="o">.</span><span class="n">size</span> <span class="o">&gt;</span> <span class="mi">48</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Too many unique values (</span><span class="si">{</span><span class="n">unique_values</span><span class="si">}</span><span class="s2">).&quot;</span><span class="p">)</span>
<span class="n">out</span> <span class="o">=</span> <span class="n">request_values</span><span class="p">(</span>
<span class="p">{</span><span class="n">k</span><span class="p">:</span> <span class="p">{</span><span class="s2">&quot;widget_type&quot;</span><span class="p">:</span> <span class="s2">&quot;LineEdit&quot;</span><span class="p">,</span> <span class="s2">&quot;value&quot;</span><span class="p">:</span> <span class="n">k</span><span class="p">}</span> <span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="n">unique_values</span><span class="p">},</span>
<span class="n">parent</span><span class="o">=</span><span class="n">viewer</span><span class="o">.</span><span class="n">_qwidget</span><span class="p">,</span>
<span class="p">)</span>
<span class="k">if</span> <span class="n">out</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">table_out</span> <span class="o">=</span> <span class="n">viewer</span><span class="o">.</span><span class="n">add_table</span><span class="p">(</span><span class="n">out</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">table</span><span class="o">.</span><span class="n">name</span><span class="si">}</span><span class="s2">-melt&quot;</span><span class="p">)</span>
<span class="n">table_out</span><span class="o">.</span><span class="n">_source</span> <span class="o">=</span> <span class="n">Source</span><span class="o">.</span><span class="n">from_table</span><span class="p">(</span><span class="n">table</span><span class="p">)</span></div>
<span class="n">ser_mapped</span> <span class="o">=</span> <span class="n">ser</span><span class="o">.</span><span class="n">map</span><span class="p">(</span><span class="n">out</span><span class="p">)</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">df</span><span class="o">.</span><span class="n">dtypes</span><span class="p">[</span><span class="n">colname</span><span class="p">])</span>
<span class="n">table</span><span class="o">.</span><span class="n">assign</span><span class="p">({</span><span class="n">colname</span><span class="p">:</span> <span class="n">ser_mapped</span><span class="p">})</span></div>


<div class="viewcode-block" id="transpose"><a class="viewcode-back" href="../../../apidoc/tabulous.commands.html#tabulous.commands.table.transpose">[docs]</a><span class="k">def</span> <span class="nf">transpose</span><span class="p">(</span><span class="n">viewer</span><span class="p">:</span> <span class="n">TableViewerBase</span><span class="p">):</span>
Expand Down
Loading

0 comments on commit ae5de8f

Please sign in to comment.