select() Method Requires Unique Column Names | Teradata Python Package - 17.00 - select() Method Requires Unique Column Names - Teradata Package for Python

Teradata® Package for Python User Guide

Product
Teradata Package for Python
Release Number
17.00
Release Date
November 2021
Content Type
User Guide
Publication ID
B700-4006-070K
Language
English (United States)

The select method does not handle identical column names being passed as arguments.

For example:

>>> df = DataFrame('table1')
>>> df.select(['col1', 'col1'])

To work around, use the assign method to provide an alias.

# c1 and c2 both refer to the col1 column
>>> df.assign(c1 = df.col1, c2 = df.col1)