
# teradataml-plus
Python Package that extends the functionality of the popular [teradataml](https://pypi.org/project/teradataml/) package through [monkey-patching](https://en.wikipedia.org/wiki/Monkey_patch).
This is to use field-developed assets more naturally with the existing interface.
## Installation
* `pip install teradataml-plus`
## Quickstart
```python
#always import teradata-plus (tdmlplus) first
import tdmlplus
#then import teradataml. It will have all the additional functionality
import teradataml as tdml
# one additional function is for instance to get a correlation matrix straight from the DataFrame, just like in pandas
DF = tdml.DataFrame("some_table")
DF_corr = DF.corr() # not possible withot tdmlplus
```
# History
## v0.1.0 (2025-07-25)
* `teradataml.DataFrame`
* `corr(method="pearson")` – correlation matrix like in pandas
* `teradataml.random`
* `randn(n, mean=0.0, std=1.0)` – random normally distributed variables
* `teradataml.dba`
* `get_amps_count()` – get number of AMPs
## v0.2.0 (2025-07-30)
* `teradataml.DataFrame`
* `show_CTE_query()` – generate full lineage SQL with CTEs
* `deploy_CTE_view(view_name, replace=False)` – create a view from the full CTE SQL
* `easyjoin(other, on, how="left", lsuffix=None, rsuffix=None)` – simplified join using common column names with suffix handling
* `tdml.dataframe.sql._SQLColumnExpression` - aka DataFrameColumn
* `trycast(dtype)` – apply TRYCAST SQL expression to a column
* `hashbin(num_bins, salt=None)` – compute hash bin from a column with optional salt
* `_power_transform_get_lambda(method="yeo-johnson")` – estimate lambda for power transform
* `power_transform(method="yeo-johnson", lambda_val=None)` – apply power transform
* `power_fit_transform(method="yeo-johnson")` – estimate lambda and transform in one step
* `teradataml.random`
* `_generate_sql_for_correlated_normals(cov_matrix)` – internal SQL generator for correlated normals
* `correlated_normals(df, mean=None, cov=None)` – generate synthetic data with correlation structure
* `tdml.widgets`
* `tab_dfs(dfs)` – display multiple DataFrames/tables in widget tabs
* `teradataml`
* `prettyprint_sql(query)` – pretty-print SQL with indentation and keyword formatting
## v0.3.0 (2025-08-18)
* `teradataml.DataFrame`
* `top(n=10, percentage=None)` – efficient limiting via Teradata `TOP`/`TOP PERCENT`
* `head(n=5, sort_index=False)` – overridden to support `sort_index`; original preserved as `_head`
* `select_dtypes(include=None, exclude=None)` – filter columns by logical dtypes
* `select_tdtypes(include=None, exclude=None)` – filter columns by Teradata types
* `histogram(bins=10, exclude_index=True, target_columns=None, groupby_columns=None)` – equal-width histograms for numeric columns
* `plot_hist(bins=10, exclude_index=True, target_columns=None, groupby_columns=None, library="plotly", absolute_values=True, percentage_values=False)` – plot histograms with Plotly or Seaborn
* `hist(...)` – alias for `plot_hist`
* `categorical_summary(target_columns=None, exclude_index=True, include_percentages=False)` – summaries for `CHAR`/`VARCHAR` columns
* `column_summary(target_columns=None, exclude_index=True)` – general per-column summary
* `fill_RowId(rowid_columnname="row_id")` – add sequential row id
* `reset_index(...)` – alias for `fill_RowId`
* `tdml.dataframe.sql._SQLColumnExpression` - aka DataFrameColumn
* `histogram(bins=10)` – column-level histogram with numeric type validation
* `plot_hist(bins=10, library="plotly", absolute_values=True, percentage_values=False, **plotting_args)` – column-level plotting wrapper
* `hist(...)` – alias for `plot_hist`
* `map(value_map, keep_original=True, default_else_value=None, output_type=None)` – SQL `CASE` mapping with output type inference
Raw data
{
"_id": null,
"home_page": null,
"name": "teradataml-plus",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "teradataml-plus, teradata, database, teradataml",
"author": "Martin Hillebrand",
"author_email": "martin.hillebrand@teradata.com",
"download_url": "https://files.pythonhosted.org/packages/71/ab/8d39c788484f6aed7c6382a2522457ab89a22cf977475f3f5efe18820dc0/teradataml-plus-0.3.1.tar.gz",
"platform": null,
"description": "\n\n# teradataml-plus\n\nPython Package that extends the functionality of the popular [teradataml](https://pypi.org/project/teradataml/) package through [monkey-patching](https://en.wikipedia.org/wiki/Monkey_patch).\nThis is to use field-developed assets more naturally with the existing interface.\n\n## Installation\n\n* `pip install teradataml-plus`\n\n## Quickstart\n\n```python\n#always import teradata-plus (tdmlplus) first\nimport tdmlplus\n\n#then import teradataml. It will have all the additional functionality\nimport teradataml as tdml\n\n# one additional function is for instance to get a correlation matrix straight from the DataFrame, just like in pandas\n\nDF = tdml.DataFrame(\"some_table\")\nDF_corr = DF.corr() # not possible withot tdmlplus\n```\n\n\n\n# History\n\n## v0.1.0 (2025-07-25)\n\n* `teradataml.DataFrame`\n * `corr(method=\"pearson\")` \u2013 correlation matrix like in pandas\n\n* `teradataml.random`\n * `randn(n, mean=0.0, std=1.0)` \u2013 random normally distributed variables\n\n* `teradataml.dba`\n * `get_amps_count()` \u2013 get number of AMPs\n\n\n## v0.2.0 (2025-07-30)\n\n* `teradataml.DataFrame`\n * `show_CTE_query()` \u2013 generate full lineage SQL with CTEs\n * `deploy_CTE_view(view_name, replace=False)` \u2013 create a view from the full CTE SQL\n * `easyjoin(other, on, how=\"left\", lsuffix=None, rsuffix=None)` \u2013 simplified join using common column names with suffix handling\n\n* `tdml.dataframe.sql._SQLColumnExpression` - aka DataFrameColumn\n * `trycast(dtype)` \u2013 apply TRYCAST SQL expression to a column\n * `hashbin(num_bins, salt=None)` \u2013 compute hash bin from a column with optional salt\n * `_power_transform_get_lambda(method=\"yeo-johnson\")` \u2013 estimate lambda for power transform\n * `power_transform(method=\"yeo-johnson\", lambda_val=None)` \u2013 apply power transform\n * `power_fit_transform(method=\"yeo-johnson\")` \u2013 estimate lambda and transform in one step\n\n* `teradataml.random`\n * `_generate_sql_for_correlated_normals(cov_matrix)` \u2013 internal SQL generator for correlated normals\n * `correlated_normals(df, mean=None, cov=None)` \u2013 generate synthetic data with correlation structure\n\n* `tdml.widgets`\n * `tab_dfs(dfs)` \u2013 display multiple DataFrames/tables in widget tabs\n\n* `teradataml`\n * `prettyprint_sql(query)` \u2013 pretty-print SQL with indentation and keyword formatting\n\n\n## v0.3.0 (2025-08-18)\n\n* `teradataml.DataFrame`\n * `top(n=10, percentage=None)` \u2013 efficient limiting via Teradata `TOP`/`TOP PERCENT`\n * `head(n=5, sort_index=False)` \u2013 overridden to support `sort_index`; original preserved as `_head`\n * `select_dtypes(include=None, exclude=None)` \u2013 filter columns by logical dtypes\n * `select_tdtypes(include=None, exclude=None)` \u2013 filter columns by Teradata types\n * `histogram(bins=10, exclude_index=True, target_columns=None, groupby_columns=None)` \u2013 equal-width histograms for numeric columns\n * `plot_hist(bins=10, exclude_index=True, target_columns=None, groupby_columns=None, library=\"plotly\", absolute_values=True, percentage_values=False)` \u2013 plot histograms with Plotly or Seaborn\n * `hist(...)` \u2013 alias for `plot_hist`\n * `categorical_summary(target_columns=None, exclude_index=True, include_percentages=False)` \u2013 summaries for `CHAR`/`VARCHAR` columns\n * `column_summary(target_columns=None, exclude_index=True)` \u2013 general per-column summary\n * `fill_RowId(rowid_columnname=\"row_id\")` \u2013 add sequential row id\n * `reset_index(...)` \u2013 alias for `fill_RowId`\n\n* `tdml.dataframe.sql._SQLColumnExpression` - aka DataFrameColumn\n * `histogram(bins=10)` \u2013 column-level histogram with numeric type validation\n * `plot_hist(bins=10, library=\"plotly\", absolute_values=True, percentage_values=False, **plotting_args)` \u2013 column-level plotting wrapper\n * `hist(...)` \u2013 alias for `plot_hist`\n * `map(value_map, keep_original=True, default_else_value=None, output_type=None)` \u2013 SQL `CASE` mapping with output type inference\n",
"bugtrack_url": null,
"license": null,
"summary": "Python Package that extends the functionality of the popular teradataml package through monkey-patching.",
"version": "0.3.1",
"project_urls": null,
"split_keywords": [
"teradataml-plus",
" teradata",
" database",
" teradataml"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0195df6df18a02d26f282b1b751b96acc876a221bf11c4b96c7aa4680b3b3be9",
"md5": "b7a64724a2f4623ed7ac8e8ffb73eaf4",
"sha256": "c4ed601fc50af453d6ab20fdcfd475575d50cf3c5e315404606c078cae495d7b"
},
"downloads": -1,
"filename": "teradataml_plus-0.3.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b7a64724a2f4623ed7ac8e8ffb73eaf4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 37867,
"upload_time": "2025-08-19T12:23:04",
"upload_time_iso_8601": "2025-08-19T12:23:04.776422Z",
"url": "https://files.pythonhosted.org/packages/01/95/df6df18a02d26f282b1b751b96acc876a221bf11c4b96c7aa4680b3b3be9/teradataml_plus-0.3.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "71ab8d39c788484f6aed7c6382a2522457ab89a22cf977475f3f5efe18820dc0",
"md5": "0852d12fb59e45e4451ed9ed394610f0",
"sha256": "a51f7b2cfe524abb9db0d5a370fc4928da05a76fd72a92dec9bde0a287ce584f"
},
"downloads": -1,
"filename": "teradataml-plus-0.3.1.tar.gz",
"has_sig": false,
"md5_digest": "0852d12fb59e45e4451ed9ed394610f0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 36559,
"upload_time": "2025-08-19T12:23:06",
"upload_time_iso_8601": "2025-08-19T12:23:06.394197Z",
"url": "https://files.pythonhosted.org/packages/71/ab/8d39c788484f6aed7c6382a2522457ab89a22cf977475f3f5efe18820dc0/teradataml-plus-0.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-19 12:23:06",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "teradataml-plus"
}