Skip to content Skip to sidebar Skip to footer
Showing posts with the label Apache Spark

How To Get 1000 Records From Dataframe And Write Into A File Using Pyspark?

I am having 100,000+ of records in dataframe. I want to create a file dynamically and push 1000 rec… Read more How To Get 1000 Records From Dataframe And Write Into A File Using Pyspark?

Pyspark - Create New Column From Operations Of Dataframe Columns Gives Error "column Is Not Iterable"

I have a PySpark DataFrame and I have tried many examples showing how to create a new column based … Read more Pyspark - Create New Column From Operations Of Dataframe Columns Gives Error "column Is Not Iterable"

How To Drop Columns Based On Multiple Filters In A Dataframe Using Pyspark?

I have a list of valid values that a cell can have. If one cell in a column is invalid, I need to d… Read more How To Drop Columns Based On Multiple Filters In A Dataframe Using Pyspark?

Convert Timestamp To Date In Spark Dataframe

I've seen (here: How to convert Timestamp to Date format in DataFrame?) the way to convert a ti… Read more Convert Timestamp To Date In Spark Dataframe

Update The Nested Json With Another Nested Json Using Python

For example, I have one full set of nested JSON, I need to update this JSON with the latest values … Read more Update The Nested Json With Another Nested Json Using Python

Round Double Values And Cast As Integers

I have a data frame in PySpark like below. import pyspark.sql.functions as func df = sqlContext.c… Read more Round Double Values And Cast As Integers