Skip to content
  • Home
  • About
|       { One stop for all Spark Examples }
Spark by {Examples}
  • Spark
    • Spark RDD
    • Spark DataFrame
    • Spark SQL Functions
    • What’s New in Spark 3.0?
    • Spark Streaming
  • PySpark
  • Pandas
  • Hive
  • Kafka
  • H2O.ai
  • More
    • Apache Hadoop
    • Apache HBase
    • Apache Cassandra
    • Snowflake Database
    • H2O Sparkling Water
    • Scala Language
    • Python NumPy
    • FAQ’s
Menu Close
  • Spark
    • Spark RDD
    • Spark DataFrame
    • Spark SQL Functions
    • What’s New in Spark 3.0?
    • Spark Streaming
  • PySpark
  • Pandas
  • Hive
  • Kafka
  • H2O.ai
  • More
    • Apache Hadoop
    • Apache HBase
    • Apache Cassandra
    • Snowflake Database
    • H2O Sparkling Water
    • Scala Language
    • Python NumPy
    • FAQ’s
  • Home
  • About
Apache Spark

Spark Cast String Type to Integer Type (int)

In Spark SQL, in order to convert/cast String Type to Integer Type (int), you can use cast() function of Column class, use this function with withColumn(), select(), selectExpr() and SQL…

3 Comments
March 12, 2021
PySpark

PySpark Convert String Type to Double Type

In PySpark SQL, using the cast() function you can convert the DataFrame column from String Type to Double Type or Float Type. This function takes the argument string representing the…

0 Comments
March 12, 2021
Read more about the article PySpark – Cast Column Type With Examples
PySpark

PySpark – Cast Column Type With Examples

In PySpark, you can cast or change the DataFrame column data type using cast() function of Column class, in this article, I will be using withColumn(), selectExpr(), and SQL expression…

0 Comments
August 14, 2020
Read more about the article Spark – How to Change Column Type?
Apache Spark

Spark – How to Change Column Type?

To change the Spark SQL DataFrame column type from one data type to another data type you should use cast() function of Column class, you can use this on withColumn(),…

8 Comments
November 12, 2019

Categories

  • Apache Hadoop
  • Apache Spark
  • Apache Spark Streaming
  • Apache Kafka
  • Apache HBase
  • Apache Cassandra
  • Snowflake Database
  • H2O Sparkling Water
  • PySpark

Recent Posts

  • Python Dictionary Methods
  • Python Dictionary setdefault() Method
  • Python Dictionary popitem() Method
  • Python Dictionary pop() Method
  • Python Dictionary update() Method
  • Python Dictionary fromkeys() Usage With Example
  • Python Dictionary copy()
  • Python Dictionary keys() Method Usage
  • Python Dictionary Values()
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

About SparkByExamples.com

SparkByExamples.com is a Big Data and Spark examples community page, all examples are simple and easy to understand, and well tested in our development environment Read more ..
Copyright sparkbyexamples.com