Skip to content

Commit

Permalink
Auto-generated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jzsmoreno committed May 10, 2024
1 parent 1da7d92 commit 50b5de7
Show file tree
Hide file tree
Showing 6 changed files with 499 additions and 342 deletions.
130 changes: 82 additions & 48 deletions docs/health.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@ <h1 class="title">Module <code>pydbsmgr.health</code></h1>
def fix(self, cols_upper_case: bool = False, drop_empty_cols: bool = True) -&gt; None:
&#34;&#34;&#34;Performs the clean of the data and validation

Args:
-----
cols_upper_case (`bool`, optional): Indicates whether to convert column names to uppercase. Defaults to `False`.
drop_empty_cols (`bool`, optional): Variable indicating whether columns with all their values empty should be removed. Defaults to `True`.
Parameters
----------
cols_upper_case : `bool`, `optional`
Indicates whether to convert column names to uppercase. Defaults to `False`.
drop_empty_cols : `bool`, `optional`
Variable indicating whether columns with all their values empty should be removed. Defaults to `True`.
&#34;&#34;&#34;
if drop_empty_cols:
for count, df in enumerate(self._dfs):
Expand All @@ -88,14 +90,20 @@ <h1 class="title">Module <code>pydbsmgr.health</code></h1>
) -&gt; None:
&#34;&#34;&#34;Generate a `.html` health check report.

Args:
-----
report_name (`str`, optional): Name of the quality assessment report. Defaults to `./report.html`.
yaml_name (`str`, optional): Indicates the name of the `.yaml` file that will serve as a template for the creation of the SQL table. Defaults to `./output.yaml`.
database_name (`str`, optional): The header of the `.yaml` file. Default value is `database`
directory_name (`str`, optional): Folder in which the reports will be saved. Defaults to `summary`.
concat_vertically: (`bool`, optional), Variable indicating whether the list of dataframes should be vertically concatenated into a single one. Default value is `False`.
encoding (`str`, optional): The encoding of dataframes. Defaults to `utf-8`.
Parameters
----------
report_name : `str`, `optional`
Name of the quality assessment report. Defaults to `./report.html`.
yaml_name : `str`, `optional`
Indicates the name of the `.yaml` file that will serve as a template for the creation of the SQL table. Defaults to `./output.yaml`.
database_name : `str`, `optional`
The header of the `.yaml` file. Default value is `database`
directory_name : `str`, `optional`
Folder in which the reports will be saved. Defaults to `summary`.
concat_vertically : `bool`, `optional`
Variable indicating whether the list of dataframes should be vertically concatenated into a single one. Default value is `False`.
encoding : `str`, `optional`
The encoding of dataframes. Defaults to `utf-8`.
&#34;&#34;&#34;
self.df_files_info = pd.DataFrame()
self.yaml_name = yaml_name
Expand Down Expand Up @@ -239,10 +247,12 @@ <h2 class="section-title" id="header-classes">Classes</h2>
def fix(self, cols_upper_case: bool = False, drop_empty_cols: bool = True) -&gt; None:
&#34;&#34;&#34;Performs the clean of the data and validation

Args:
-----
cols_upper_case (`bool`, optional): Indicates whether to convert column names to uppercase. Defaults to `False`.
drop_empty_cols (`bool`, optional): Variable indicating whether columns with all their values empty should be removed. Defaults to `True`.
Parameters
----------
cols_upper_case : `bool`, `optional`
Indicates whether to convert column names to uppercase. Defaults to `False`.
drop_empty_cols : `bool`, `optional`
Variable indicating whether columns with all their values empty should be removed. Defaults to `True`.
&#34;&#34;&#34;
if drop_empty_cols:
for count, df in enumerate(self._dfs):
Expand All @@ -266,14 +276,20 @@ <h2 class="section-title" id="header-classes">Classes</h2>
) -&gt; None:
&#34;&#34;&#34;Generate a `.html` health check report.

Args:
-----
report_name (`str`, optional): Name of the quality assessment report. Defaults to `./report.html`.
yaml_name (`str`, optional): Indicates the name of the `.yaml` file that will serve as a template for the creation of the SQL table. Defaults to `./output.yaml`.
database_name (`str`, optional): The header of the `.yaml` file. Default value is `database`
directory_name (`str`, optional): Folder in which the reports will be saved. Defaults to `summary`.
concat_vertically: (`bool`, optional), Variable indicating whether the list of dataframes should be vertically concatenated into a single one. Default value is `False`.
encoding (`str`, optional): The encoding of dataframes. Defaults to `utf-8`.
Parameters
----------
report_name : `str`, `optional`
Name of the quality assessment report. Defaults to `./report.html`.
yaml_name : `str`, `optional`
Indicates the name of the `.yaml` file that will serve as a template for the creation of the SQL table. Defaults to `./output.yaml`.
database_name : `str`, `optional`
The header of the `.yaml` file. Default value is `database`
directory_name : `str`, `optional`
Folder in which the reports will be saved. Defaults to `summary`.
concat_vertically : `bool`, `optional`
Variable indicating whether the list of dataframes should be vertically concatenated into a single one. Default value is `False`.
encoding : `str`, `optional`
The encoding of dataframes. Defaults to `utf-8`.
&#34;&#34;&#34;
self.df_files_info = pd.DataFrame()
self.yaml_name = yaml_name
Expand Down Expand Up @@ -383,21 +399,26 @@ <h3>Methods</h3>
</code></dt>
<dd>
<div class="desc"><p>Performs the clean of the data and validation</p>
<h2 id="args">Args:</h2>
<pre><code>cols_upper_case (&lt;code&gt;bool&lt;/code&gt;, optional): Indicates whether to convert column names to uppercase. Defaults to &lt;code&gt;False&lt;/code&gt;.
drop_empty_cols (&lt;code&gt;bool&lt;/code&gt;, optional): Variable indicating whether columns with all their values empty should be removed. Defaults to &lt;code&gt;True&lt;/code&gt;.
</code></pre></div>
<h2 id="parameters">Parameters</h2>
<dl>
<dt><strong><code>cols_upper_case</code></strong> :&ensp;<code>bool<code>,</code>optional</code></dt>
<dd>Indicates whether to convert column names to uppercase. Defaults to <code>False</code>.</dd>
<dt><strong><code>drop_empty_cols</code></strong> :&ensp;<code>bool<code>,</code>optional</code></dt>
<dd>Variable indicating whether columns with all their values empty should be removed. Defaults to <code>True</code>.</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def fix(self, cols_upper_case: bool = False, drop_empty_cols: bool = True) -&gt; None:
&#34;&#34;&#34;Performs the clean of the data and validation

Args:
-----
cols_upper_case (`bool`, optional): Indicates whether to convert column names to uppercase. Defaults to `False`.
drop_empty_cols (`bool`, optional): Variable indicating whether columns with all their values empty should be removed. Defaults to `True`.
Parameters
----------
cols_upper_case : `bool`, `optional`
Indicates whether to convert column names to uppercase. Defaults to `False`.
drop_empty_cols : `bool`, `optional`
Variable indicating whether columns with all their values empty should be removed. Defaults to `True`.
&#34;&#34;&#34;
if drop_empty_cols:
for count, df in enumerate(self._dfs):
Expand All @@ -413,14 +434,21 @@ <h2 id="args">Args:</h2>
</code></dt>
<dd>
<div class="desc"><p>Generate a <code>.html</code> health check report.</p>
<h2 id="args">Args:</h2>
<pre><code>report_name (&lt;code&gt;str&lt;/code&gt;, optional): Name of the quality assessment report. Defaults to `./report.html`.
yaml_name (&lt;code&gt;str&lt;/code&gt;, optional): Indicates the name of the &lt;code&gt;.yaml&lt;/code&gt; file that will serve as a template for the creation of the SQL table. Defaults to `./output.yaml`.
database_name (&lt;code&gt;str&lt;/code&gt;, optional): The header of the &lt;code&gt;.yaml&lt;/code&gt; file. Default value is &lt;code&gt;database&lt;/code&gt;
directory_name (&lt;code&gt;str&lt;/code&gt;, optional): Folder in which the reports will be saved. Defaults to &lt;code&gt;summary&lt;/code&gt;.
concat_vertically: (&lt;code&gt;bool&lt;/code&gt;, optional), Variable indicating whether the list of dataframes should be vertically concatenated into a single one. Default value is &lt;code&gt;False&lt;/code&gt;.
encoding (&lt;code&gt;str&lt;/code&gt;, optional): The encoding of dataframes. Defaults to `utf-8`.
</code></pre></div>
<h2 id="parameters">Parameters</h2>
<dl>
<dt><strong><code>report_name</code></strong> :&ensp;<code>str<code>,</code>optional</code></dt>
<dd>Name of the quality assessment report. Defaults to <code>./report.html</code>.</dd>
<dt><strong><code>yaml_name</code></strong> :&ensp;<code>str<code>,</code>optional</code></dt>
<dd>Indicates the name of the <code>.yaml</code> file that will serve as a template for the creation of the SQL table. Defaults to <code>./output.yaml</code>.</dd>
<dt><strong><code>database_name</code></strong> :&ensp;<code>str<code>,</code>optional</code></dt>
<dd>The header of the <code>.yaml</code> file. Default value is <code>database</code></dd>
<dt><strong><code>directory_name</code></strong> :&ensp;<code>str<code>,</code>optional</code></dt>
<dd>Folder in which the reports will be saved. Defaults to <code>summary</code>.</dd>
<dt><strong><code>concat_vertically</code></strong> :&ensp;<code>bool<code>,</code>optional</code></dt>
<dd>Variable indicating whether the list of dataframes should be vertically concatenated into a single one. Default value is <code>False</code>.</dd>
<dt><strong><code>encoding</code></strong> :&ensp;<code>str<code>,</code>optional</code></dt>
<dd>The encoding of dataframes. Defaults to <code>utf-8</code>.</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
Expand All @@ -436,14 +464,20 @@ <h2 id="args">Args:</h2>
) -&gt; None:
&#34;&#34;&#34;Generate a `.html` health check report.

Args:
-----
report_name (`str`, optional): Name of the quality assessment report. Defaults to `./report.html`.
yaml_name (`str`, optional): Indicates the name of the `.yaml` file that will serve as a template for the creation of the SQL table. Defaults to `./output.yaml`.
database_name (`str`, optional): The header of the `.yaml` file. Default value is `database`
directory_name (`str`, optional): Folder in which the reports will be saved. Defaults to `summary`.
concat_vertically: (`bool`, optional), Variable indicating whether the list of dataframes should be vertically concatenated into a single one. Default value is `False`.
encoding (`str`, optional): The encoding of dataframes. Defaults to `utf-8`.
Parameters
----------
report_name : `str`, `optional`
Name of the quality assessment report. Defaults to `./report.html`.
yaml_name : `str`, `optional`
Indicates the name of the `.yaml` file that will serve as a template for the creation of the SQL table. Defaults to `./output.yaml`.
database_name : `str`, `optional`
The header of the `.yaml` file. Default value is `database`
directory_name : `str`, `optional`
Folder in which the reports will be saved. Defaults to `summary`.
concat_vertically : `bool`, `optional`
Variable indicating whether the list of dataframes should be vertically concatenated into a single one. Default value is `False`.
encoding : `str`, `optional`
The encoding of dataframes. Defaults to `utf-8`.
&#34;&#34;&#34;
self.df_files_info = pd.DataFrame()
self.yaml_name = yaml_name
Expand Down
96 changes: 50 additions & 46 deletions docs/lightest.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ <h1 class="title">Module <code>pydbsmgr.lightest</code></h1>

Parameters
----------
x : `str`
character of type date.
x : `str`
character of type date.

Returns
----------
x : `str`
character after processing with format `YYYY-MM-DD`.
x : `str`
character after processing with format `YYYY-MM-DD`.
&#34;&#34;&#34;
# performing data type conversion
x = str(x)
Expand Down Expand Up @@ -106,16 +106,17 @@ <h1 class="title">Module <code>pydbsmgr.lightest</code></h1>

Parameters
----------
- sample_frac (`float`): The fraction of rows to use for date type inference. Default is 0.1 i.e., 10%.
- fast_execution (`bool`): If `False` use `applymap` pandas for extra text cleanup. Default is `True`.
sample_frac : `float`
The fraction of rows to use for date type inference. Default is 0.1 i.e., 10%.
fast_execution : `bool`
If `False` use `applymap` pandas for extra text cleanup. Default is `True`.

Keyword Arguments:
----------
- no_emoji: (`bool`): By default it is set to `False`.
If `True`, removes all emojis from text data. Works only when `fast_execution` = `False`.
- title_mode: (`bool`): By default it is set to `True`.
If `False`, converts the text to lowercase. Works only when `fast_execution` = `False`.
By default, converts everything to `title`.
no_emoji : `bool`
By default it is set to `False`. If `True`, removes all emojis from text data. Works only when `fast_execution` = `False`.
title_mode : `bool`
By default it is set to `True`. If `False`, converts the text to lowercase. Works only when `fast_execution` = `False`. By default, converts everything to `title`.
&#34;&#34;&#34;
table = (self.df).copy()
cols = table.columns
Expand Down Expand Up @@ -271,13 +272,15 @@ <h2 class="section-title" id="header-functions">Functions</h2>
<dd>
<div class="desc"><p>Auxiliary function in date type string processing</p>
<h2 id="parameters">Parameters</h2>
<pre><code>x : &lt;code&gt;str&lt;/code&gt;
character of type date.
</code></pre>
<dl>
<dt><strong><code>x</code></strong> :&ensp;<code>str</code></dt>
<dd>character of type date.</dd>
</dl>
<h2 id="returns">Returns</h2>
<pre><code>x : &lt;code&gt;str&lt;/code&gt;
character after processing with format `YYYY-MM-DD`.
</code></pre></div>
<dl>
<dt><strong><code>x</code></strong> :&ensp;<code>str</code></dt>
<dd>character after processing with format <code>YYYY-MM-DD</code>.</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
Expand All @@ -287,13 +290,13 @@ <h2 id="returns">Returns</h2>

Parameters
----------
x : `str`
character of type date.
x : `str`
character of type date.

Returns
----------
x : `str`
character after processing with format `YYYY-MM-DD`.
x : `str`
character after processing with format `YYYY-MM-DD`.
&#34;&#34;&#34;
# performing data type conversion
x = str(x)
Expand Down Expand Up @@ -371,16 +374,17 @@ <h2 class="section-title" id="header-classes">Classes</h2>

Parameters
----------
- sample_frac (`float`): The fraction of rows to use for date type inference. Default is 0.1 i.e., 10%.
- fast_execution (`bool`): If `False` use `applymap` pandas for extra text cleanup. Default is `True`.
sample_frac : `float`
The fraction of rows to use for date type inference. Default is 0.1 i.e., 10%.
fast_execution : `bool`
If `False` use `applymap` pandas for extra text cleanup. Default is `True`.

Keyword Arguments:
----------
- no_emoji: (`bool`): By default it is set to `False`.
If `True`, removes all emojis from text data. Works only when `fast_execution` = `False`.
- title_mode: (`bool`): By default it is set to `True`.
If `False`, converts the text to lowercase. Works only when `fast_execution` = `False`.
By default, converts everything to `title`.
no_emoji : `bool`
By default it is set to `False`. If `True`, removes all emojis from text data. Works only when `fast_execution` = `False`.
title_mode : `bool`
By default it is set to `True`. If `False`, converts the text to lowercase. Works only when `fast_execution` = `False`. By default, converts everything to `title`.
&#34;&#34;&#34;
table = (self.df).copy()
cols = table.columns
Expand Down Expand Up @@ -541,18 +545,17 @@ <h3>Methods</h3>
<dd>
<div class="desc"><p><code>DataFrame</code> cleaning main function</p>
<h2 id="parameters">Parameters</h2>
<ul>
<li>sample_frac (<code>float</code>): The fraction of rows to use for date type inference. Default is 0.1 i.e., 10%.</li>
<li>fast_execution (<code>bool</code>): If <code>False</code> use <code>applymap</code> pandas for extra text cleanup. Default is <code>True</code>.</li>
</ul>
<dl>
<dt><strong><code>sample_frac</code></strong> :&ensp;<code>float</code></dt>
<dd>The fraction of rows to use for date type inference. Default is 0.1 i.e., 10%.</dd>
<dt><strong><code>fast_execution</code></strong> :&ensp;<code>bool</code></dt>
<dd>If <code>False</code> use <code>applymap</code> pandas for extra text cleanup. Default is <code>True</code>.</dd>
</dl>
<h2 id="keyword-arguments">Keyword Arguments:</h2>
<ul>
<li>no_emoji: (<code>bool</code>): By default it is set to <code>False</code>.
If <code>True</code>, removes all emojis from text data. Works only when <code>fast_execution</code> = <code>False</code>.</li>
<li>title_mode: (<code>bool</code>): By default it is set to <code>True</code>.
If <code>False</code>, converts the text to lowercase. Works only when <code>fast_execution</code> = <code>False</code>.
By default, converts everything to <code>title</code>.</li>
</ul></div>
<p>no_emoji : <code>bool</code>
By default it is set to <code>False</code>. If <code>True</code>, removes all emojis from text data. Works only when <code>fast_execution</code> = <code>False</code>.
title_mode : <code>bool</code>
By default it is set to <code>True</code>. If <code>False</code>, converts the text to lowercase. Works only when <code>fast_execution</code> = <code>False</code>. By default, converts everything to <code>title</code>.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
Expand All @@ -568,16 +571,17 @@ <h2 id="keyword-arguments">Keyword Arguments:</h2>

Parameters
----------
- sample_frac (`float`): The fraction of rows to use for date type inference. Default is 0.1 i.e., 10%.
- fast_execution (`bool`): If `False` use `applymap` pandas for extra text cleanup. Default is `True`.
sample_frac : `float`
The fraction of rows to use for date type inference. Default is 0.1 i.e., 10%.
fast_execution : `bool`
If `False` use `applymap` pandas for extra text cleanup. Default is `True`.

Keyword Arguments:
----------
- no_emoji: (`bool`): By default it is set to `False`.
If `True`, removes all emojis from text data. Works only when `fast_execution` = `False`.
- title_mode: (`bool`): By default it is set to `True`.
If `False`, converts the text to lowercase. Works only when `fast_execution` = `False`.
By default, converts everything to `title`.
no_emoji : `bool`
By default it is set to `False`. If `True`, removes all emojis from text data. Works only when `fast_execution` = `False`.
title_mode : `bool`
By default it is set to `True`. If `False`, converts the text to lowercase. Works only when `fast_execution` = `False`. By default, converts everything to `title`.
&#34;&#34;&#34;
table = (self.df).copy()
cols = table.columns
Expand Down
Loading

0 comments on commit 50b5de7

Please sign in to comment.