Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mdancho84 committed Dec 28, 2023
1 parent 6d5ab37 commit e0f4115
Show file tree
Hide file tree
Showing 11 changed files with 2,236 additions and 616 deletions.
2 changes: 2 additions & 0 deletions docs/_sidebar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ website:
- reference/glimpse.qmd
- reference/parallel_apply.qmd
- reference/progress_apply.qmd
- reference/drop_zero_variance.qmd
- reference/transform_columns.qmd
- reference/flatten_multiindex_column_names.qmd
section: Extra Pandas Helpers (That Help Beyond Just Time Series)
- contents:
Expand Down
757 changes: 757 additions & 0 deletions docs/_site/reference/drop_zero_variance.html

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions docs/_site/reference/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,14 @@ <h2 class="anchored" data-anchor-id="extra-pandas-helpers-that-help-beyond-just-
<td>Adds a progress bar to pandas apply().</td>
</tr>
<tr class="even">
<td><a href="../reference/drop_zero_variance.html#pytimetk.drop_zero_variance">drop_zero_variance</a></td>
<td>The function <code>drop_zero_variance</code> takes a pandas DataFrame as input and returns a new DataFrame with</td>
</tr>
<tr class="odd">
<td><a href="../reference/transform_columns.html#pytimetk.transform_columns">transform_columns</a></td>
<td>The function <code>transform_columns</code> applies a user-provided function to specified columns in a pandas DataFrame.</td>
</tr>
<tr class="even">
<td><a href="../reference/flatten_multiindex_column_names.html#pytimetk.flatten_multiindex_column_names">flatten_multiindex_column_names</a></td>
<td>Takes a DataFrame as input and flattens the column</td>
</tr>
Expand Down
763 changes: 763 additions & 0 deletions docs/_site/reference/transform_columns.html

Large diffs are not rendered by default.

1,066 changes: 554 additions & 512 deletions docs/_site/search.json

Large diffs are not rendered by default.

212 changes: 110 additions & 102 deletions docs/_site/sitemap.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/objects.json

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions docs/reference/drop_zero_variance.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# drop_zero_variance { #pytimetk.drop_zero_variance }

`drop_zero_variance(data)`

The function `drop_zero_variance` takes a pandas DataFrame as input and returns a new DataFrame with
columns that have zero variance removed.

## Parameters

| Name | Type | Description | Default |
|--------|--------------|---------------------------------------------------------------------------------------------------|------------|
| `data` | pd.DataFrame | The `data` parameter is a pandas DataFrame or a pandas DataFrameGroupBy object. It represents the | _required_ |
| `data` | pd.DataFrame | | _required_ |

## Returns

| Type | Description |
|--------|----------------------------------------------------------------|
| | a filtered DataFrame with columns that have non-zero variance. |
2 changes: 2 additions & 0 deletions docs/reference/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ Helper functions to make your life easier.
| [glimpse](glimpse.qmd#pytimetk.glimpse) | Takes a pandas DataFrame and prints a summary of its dimensions, column |
| [parallel_apply](parallel_apply.qmd#pytimetk.parallel_apply) | The `parallel_apply` function parallelizes the application of a function on |
| [progress_apply](progress_apply.qmd#pytimetk.progress_apply) | Adds a progress bar to pandas apply(). |
| [drop_zero_variance](drop_zero_variance.qmd#pytimetk.drop_zero_variance) | The function `drop_zero_variance` takes a pandas DataFrame as input and returns a new DataFrame with |
| [transform_columns](transform_columns.qmd#pytimetk.transform_columns) | The function `transform_columns` applies a user-provided function to specified columns in a pandas DataFrame. |
| [flatten_multiindex_column_names](flatten_multiindex_column_names.qmd#pytimetk.flatten_multiindex_column_names) | Takes a DataFrame as input and flattens the column |

## 💾 13 Datasets
Expand Down
19 changes: 19 additions & 0 deletions docs/reference/transform_columns.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# transform_columns { #pytimetk.transform_columns }

`transform_columns(data, columns, transform_func)`

The function `transform_columns` applies a user-provided function to specified columns in a pandas DataFrame.

## Parameters

| Name | Type | Description | Default |
|------------------|--------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------|
| `data` | pd.DataFrame | The `data` parameter is a pandas DataFrame or a pandas DataFrameGroupBy object. It represents the data on which the transformation will be applied. | _required_ |
| `columns` | Union\[str, List\[str\]\] | The `columns` parameter can be either a string or a list of strings. These strings represent the column names or regular expressions that will be matched against the column names in the DataFrame. If a column name matches any of the provided patterns, the transformation function will be applied to that column. | _required_ |
| `transform_func` | Callable\[\[pd.Series\], pd.Series\] | A function that takes a pandas Series as input and returns a transformed pandas Series. This function will be applied to each column that matches the `columns` parameter. | _required_ |

## Returns

| Type | Description |
|--------|-----------------------------------------------------------------------------------------------------------------|
| | A modified copy of the input DataFrame where the specified columns are transformed using the provided function. |
2 changes: 1 addition & 1 deletion src/pytimetk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
reduce_memory_usage
)
from .utils.pandas_helpers import (
flatten_multiindex_column_names, glimpse, drop_zero_variance
flatten_multiindex_column_names, glimpse, drop_zero_variance, transform_columns
)
from .utils.parallel_helpers import (
parallel_apply, progress_apply
Expand Down

0 comments on commit e0f4115

Please sign in to comment.