-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
2,236 additions
and
616 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,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. | |
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,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. | |
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