20. alias(), asc(), desc(), cast() & like() functions on Columns of dataframe in PySpark | #PySpark

preview_player
Показать описание
In this video, I discussed about alias(), asc(), desc(), cast() & like() functions which are useful while working with dataframe columns.

Link for PySpark Playlist:

Link for PySpark Real Time Scenarios Playlist:

Link for Azure Synapse Analytics Playlist:

Link to Azure Synapse Real Time scenarios Playlist:

Link for Azure Data bricks Play list:

Link for Azure Functions Play list:

Link for Azure Basics Play list:

Link for Azure Data factory Play list:

Link for Azure Data Factory Real time Scenarios

Link for Azure Logic Apps playlist

#PySpark #Spark #databricks #azuresynapse #synapse #notebook #azuredatabricks #PySparkcode #dataframe #WafaStudies #maheer #azure
Рекомендации по теме
Комментарии
Автор

Thankyou so much for uploading pyspark videos . I have a request sir . Please do upload full series in pyspark . Thankyou sir.

penchalaprasadsusarla
Автор

Hi, I am trying to sort a data frame based on Sal and I want to keep the sorted output in a new column. I am trying to achieve this withcolumns and sort but getting an error. My scenario is,

id, name, sal
1, 'a', 1000
2, 'b', 2000

Required Output

id, name, sal, sorted_sal
1, 'a', 1000, 2000
2, 'b', 2000, 1000

Tried like this but not working,
df.withColumn('sorted_sal;, df.sort(df.sal.desc()))

chittaranjanpradhan
Автор

So, alias will be same as withcolumn_renamed. Please let me know when should use alias and when should we use withcolumn_renamed?

sumanthb