Skip to main content

Python Package that extends the functionality of the popular teradataml package through monkey-patching.

Project description

Logo

teradataml-plus

Python Package that extends the functionality of the popular teradataml package through monkey-patching. This is to use field-developed assets more naturally with the existing interface.

Installation

  • pip install teradataml-plus

Quickstart

#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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

teradataml-plus-0.3.0.tar.gz (36.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

teradataml_plus-0.3.0-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

File details

Details for the file teradataml-plus-0.3.0.tar.gz.

File metadata

  • Download URL: teradataml-plus-0.3.0.tar.gz
  • Upload date:
  • Size: 36.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.5

File hashes

Hashes for teradataml-plus-0.3.0.tar.gz
Algorithm Hash digest
SHA256 51016dcff5591b0b8600f5ff4246c1013566d4866877eebc74e7277dd3e2b746
MD5 c29f7a8325518bd1a4d15f0fe51196c4
BLAKE2b-256 6e96aed96bb00c0d6cfc8b7fbbca7b68463a813d0ab08ab19793d5d2c9632c00

See more details on using hashes here.

File details

Details for the file teradataml_plus-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for teradataml_plus-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 66daed43bdfe85a4ee101339c0f5a20d41d87673f91a9212b301fdc91d0185b0
MD5 5fede164350977596f7a0042542bc999
BLAKE2b-256 4c55041191380f4ace792069fd760556cece0422976e4c1e460f6535d1d07b69

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page