What is Lit() : whenever we want to add a constant literal value to entire data frame, then we go with LIT(). we can also add these values only to certain records using when and otherwise. Eg: EMPDF = df.withcolname("Bonus",when(df.sal>50k, lit(sal*10)).otherwise(lit(sal*20))....Thanks for the amazing session Raj sir
Two things to add over here : 1. If we have a column name that doesn't exist in the spark dataframe, then drop will just ignore it and not throw any error: df.drop("XYZ"). printSchema() won't throw any error in spark 3.0 2. If you want to drop multiple columns , columns should be passed ONLY as strings : df.drop('firstname', 'lastname'). printSchema() If we will pass them as column then there would be an error. The below code would run into an error: df.drop(col('firstname'), col('lastname')). printSchema()
What is Lit() : whenever we want to add a constant literal value to entire data frame, then we go with LIT(). we can also add these values only to certain records using when and otherwise. Eg: EMPDF = df.withcolname("Bonus",when(df.sal>50k, lit(sal*10)).otherwise(lit(sal*20))....Thanks for the amazing session Raj sir
Thank you Raja. Very nice video
Thanks and welcome, Siva!
Great content
Thanks!
Excelent, From Dominican REpublic
Thank you
Very nice explanation 👏
Where can we get these notebook..please share link for all the notebook.. so that we can revise
Thank you Raja. Keep it up.
Please zoom a little bit or increase the font size in lab sessions to reduce the eye strain
Sure, I will increase the font size
I have to modify the column values of existing record like location is India that alter to AUS. How to handle
superb bro.........
hi Raja can you share the list of content uploaded to this playlist
Two things to add over here :
1. If we have a column name that doesn't exist in the spark dataframe, then drop will just ignore it and not throw any error: df.drop("XYZ"). printSchema() won't throw any error in spark 3.0
2. If you want to drop multiple columns , columns should be passed ONLY as strings :
df.drop('firstname', 'lastname'). printSchema()
If we will pass them as column then there would be an error. The below code would run into an error:
df.drop(col('firstname'), col('lastname')). printSchema()
not for me
emp_DF.drop(col('gender'),col('salary')).show()
will you upload all the notebook in you google drive and provide us the link of the notebook it will be the greater help of all I guess.
Please make whole basics playlist by topic wise
Sure, will do
how to add identity coumn
Hi Guru, will post a video soon on identify column
Hi Raja,
can you kindly share data sets with us so that we can practice also
Hi Sir, I am kindly requesting could you please share notebooks
Hi raja can you kindly share data sets and codes for better practice
Very nice playlist. I have only one suggestion. Please don't use the ear deafening music in the start. Its very very loud and annoys everyone around.
Agreed. I have already changed this music in later videos. Thanks for your suggestion