About 8,720,000 results
Open links in new tab
  1. python - PySpark: "Exception: Java gateway process exited before ...

    I'm trying to run PySpark on my MacBook Air. When I try starting it up, I get the error: Exception: Java gateway process exited before sending the driver its port number when sc = SparkContext() is

  2. PySpark: multiple conditions in when clause - Stack Overflow

    Jun 8, 2016 · Very helpful observation when in pyspark multiple conditions can be built using & (for and) and | (for or). Note:In pyspark t is important to enclose every expressions within parenthesis () that …

  3. pyspark - How to use AND or OR condition in when in Spark - Stack …

    107 pyspark.sql.functions.when takes a Boolean Column as its condition. When using PySpark, it's often useful to think "Column Expression" when you read "Column". Logical operations on PySpark …

  4. Comparison operator in PySpark (not equal/ !=) - Stack Overflow

    Aug 24, 2016 · The selected correct answer does not address the question, and the other answers are all wrong for pyspark. There is no "!=" operator equivalent in pyspark for this solution.

  5. python - Spark Equivalent of IF Then ELSE - Stack Overflow

    python apache-spark pyspark apache-spark-sql edited Dec 10, 2017 at 1:43 Community Bot 1 1

  6. Rename more than one column using withColumnRenamed

    Since pyspark 3.4.0, you can use the withColumnsRenamed() method to rename multiple columns at once. It takes as an input a map of existing column names and the corresponding desired column …

  7. python - Concatenate two PySpark dataframes - Stack Overflow

    May 20, 2016 · Utilize simple unionByName method in pyspark, which concats 2 dataframes along axis 0 as done by pandas concat method. Now suppose you have df1 with columns id, uniform, normal …

  8. spark.read.json throws COLUMN_ALREADY_EXISTS, column names …

    pyspark.errors.exceptions.captured.AnalysisException: [COLUMN_ALREADY_EXISTS] The column `supportedldapversion` already exists. Consider to choose another name or rename the existing …

  9. How to change dataframe column names in PySpark?

    I come from pandas background and am used to reading data from CSV files into a dataframe and then simply changing the column names to something useful using the simple command: df.columns =

  10. Pyspark dataframe LIKE operator - Stack Overflow

    Oct 24, 2016 · What is the equivalent in Pyspark for LIKE operator? For example I would like to do: SELECT * FROM table WHERE column LIKE "*somestring*"; looking for something easy like this …