Category: spark

Spark User full article

PySpark @ Freshers.in

PySpark : How to read date datatype from CSV ?

We specify schema = true when a CSV file is being read. Spark determines the data type of a column…

Continue Reading PySpark : How to read date datatype from CSV ?
PySpark @ Freshers.in

PySpark – How to convert string date to Date datatype

pyspark.sql.functions.to_date In this article will give you brief on how can you convert string date to Date datatype . With…

Continue Reading PySpark – How to convert string date to Date datatype
PySpark @ Freshers.in

PySpark-How to returns the first column that is not null

pyspark.sql.functions.coalesce If you want to return the first non zero from list of column you can use coalesce function in…

Continue Reading PySpark-How to returns the first column that is not null
PySpark @ Freshers.in

How can you convert PySpark Dataframe to JSON ?

pyspark.sql.DataFrame.toJSON There may be some situation that you need to send your dataframe to a file to a server or…

Continue Reading How can you convert PySpark Dataframe to JSON ?