Skip to content

Commit

Permalink
Merge pull request #42 from raynardj/new_feature
Browse files Browse the repository at this point in the history
⛈ flatten function, enhanced pandas
  • Loading branch information
raynardj authored Aug 19, 2021
2 parents 1b86299 + d68ac8d commit 4ed057e
Show file tree
Hide file tree
Showing 16 changed files with 1,885 additions and 439 deletions.
6 changes: 6 additions & 0 deletions docs/_data/sidebars/home_sidebar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ entries:
- output: web,pdf
title: Overview
url: /
- output: web,pdf
title: Pandas Extra functions
url: pandas_extra.html
- output: web,pdf
title: 03 Imports
url: imports.html
Expand All @@ -24,6 +27,9 @@ entries:
- output: web,pdf
title: Interactive tools
url: inter_widgets.html
- output: web,pdf
title: Flatten
url: flatten.html
- output: web,pdf
title: spacy toolkit
url: spacy.html
Expand Down
111 changes: 111 additions & 0 deletions docs/flatten.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
---

title: Flatten


keywords: fastai
sidebar: home_sidebar



nb_path: "nbs/06_flatten.ipynb"
---
<!--
#################################################
### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ###
#################################################
# file to edit: nbs/06_flatten.ipynb
# command to build the docs after a change: nbdev_build_docs
-->

<div class="container" id="notebook-container">

{% raw %}

<div class="cell border-box-sizing code_cell rendered">

</div>
{% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Flattening-the-tree-structure">Flattening the tree structure<a class="anchor-link" href="#Flattening-the-tree-structure"> </a></h2>
</div>
</div>
</div>
{% raw %}

<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h2 id="Flatten" class="doc_header"><code>class</code> <code>Flatten</code><a href="https://github.com/raynardj/forgebox/tree/master/forgebox/flatten.py#L8" class="source_link" style="float:right">[source]</a></h2><blockquote><p><code>Flatten</code>(<strong><code>data</code></strong>, <strong><code>key_callback</code></strong>:<code>Callable</code>=<em><code>None</code></em>, <strong><code>key_connection</code></strong>:<code>str</code>=<em><code>'_'</code></em>)</p>
</blockquote>
<p>Flatten a tree structure dictionary</p>

</div>

</div>

</div>
</div>

</div>
{% endraw %}

{% raw %}

<div class="cell border-box-sizing code_cell rendered">

</div>
{% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Testing-a-tree-structure">Testing a tree structure<a class="anchor-link" href="#Testing-a-tree-structure"> </a></h2>
</div>
</div>
</div>
{% raw %}

<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">Flatten</span><span class="p">({</span><span class="s2">&quot;a&quot;</span><span class="p">:[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,{</span><span class="s2">&quot;c&quot;</span><span class="p">:</span><span class="s2">&quot;d&quot;</span><span class="p">}],</span><span class="s2">&quot;b&quot;</span><span class="p">:{</span><span class="s2">&quot;g&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">}},</span> <span class="n">key_connection</span><span class="o">=</span><span class="s2">&quot;=&gt;&quot;</span><span class="p">)()</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">



<div class="output_text output_subarea output_execute_result">
<pre>{&#39;a&#39;: [1, 2, {&#39;c&#39;: &#39;d&#39;}], &#39;b=&gt;g&#39;: 1}</pre>
</div>

</div>

</div>
</div>

</div>
{% endraw %}

</div>


54 changes: 2 additions & 52 deletions docs/imports.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

title: 03 Imports


keywords: fastai
sidebar: home_sidebar

summary: "standard imports"
description: "standard imports"
nb_path: "nbs/02_imports.ipynb"
---
<!--
Expand All @@ -31,58 +33,6 @@

<div class="cell border-box-sizing code_cell rendered">

</div>
{% endraw %}

{% raw %}

<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="list_vc" class="doc_header"><code>list_vc</code><a href="__main__.py#L7" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>list_vc</code>(<strong><code>df</code></strong>, <strong><code>colname</code></strong>:<code>str</code>, <strong><code>value</code></strong>:<code>str</code>)</p>
</blockquote>
<p>count the values in a column
that each cell is a list</p>

</div>

</div>

</div>
</div>

</div>
{% endraw %}

{% raw %}

<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="col_list_vc" class="doc_header"><code>col_list_vc</code><a href="__main__.py#L16" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>col_list_vc</code>(<strong><code>col</code></strong>, <strong><code>value</code></strong>:<code>str</code>)</p>
</blockquote>
<p>count the values in a column
that each cell is a list</p>

</div>

</div>

</div>
</div>

</div>
{% endraw %}

Expand Down
Loading

0 comments on commit 4ed057e

Please sign in to comment.