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

How To Flatten Nested Lists In Pyspark?

I have an RDD structure like: rdd = [[[1],[2],[3]], [[4],[5]], [[6]], [[7],[8],[9],[10]]] and I wa… Read more How To Flatten Nested Lists In Pyspark?

Spark - No Schema Defined, And No Parquet Data File Or Summary File Found Under

first I started $SPARK_HOME/bin/pyspark and write this code sqlContext.load('jdbc', … Read more Spark - No Schema Defined, And No Parquet Data File Or Summary File Found Under

Spark - Set Null When Column Not Exist In Dataframe

I'm loading many versions of JSON files to spark DataFrame. some of the files holds columns A,B… Read more Spark - Set Null When Column Not Exist In Dataframe

Count Substring In String Column Using Spark Dataframe

I have a Spark dataframe with a column (assigned_products) of type string that contains values such… Read more Count Substring In String Column Using Spark Dataframe

Issue With Df.show() In Pyspark

I have the following code: import pyspark import pandas as pd from pyspark.sql import SQLContext f… Read more Issue With Df.show() In Pyspark

How To Specify The Partition For Mappartition In Spark

What I would like to do is compute each list separately so for example if I have 5 list ([1,2,3,4,5… Read more How To Specify The Partition For Mappartition In Spark

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?

Unable To Open Pyspark In Mac Os

I have installed pyspark through pip but unable to open it. It shows following error . Users/sonv… Read more Unable To Open Pyspark In Mac Os