-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from raynardj/new_feature
⛈ flatten function, enhanced pandas
- Loading branch information
Showing
16 changed files
with
1,885 additions
and
439 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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">"a"</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">"c"</span><span class="p">:</span><span class="s2">"d"</span><span class="p">}],</span><span class="s2">"b"</span><span class="p">:{</span><span class="s2">"g"</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">"=>"</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>{'a': [1, 2, {'c': 'd'}], 'b=>g': 1}</pre> | ||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
</div> | ||
{% endraw %} | ||
|
||
</div> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.