snowflake.snowpark.DataFrame.rename¶
- DataFrame.rename(col_or_mapper: Union[Column, str, dict], new_column: str = None)[source]¶
Returns a DataFrame with the specified column
col_or_mapperrenamed asnew_column. Ifcol_or_mapperis a dictionary, multiple columns will be renamed in the returned DataFrame.- Example::
- Parameters:
col_or_mapper – The old column instance or column name to be renamed, or the dictionary mapping from column instances or columns names to their new names (string)
new_column – The new column name (string value), if a single old column is given