Cleaning and preparing your data
The history of data processing is long and has had several unique innovations. When you pull up data in Excel or any other data processing tool, you often see issues with the data that require fixes and changes. Data issues are extremely common, even with robust data practices. We will now go through several fundamental techniques using Apache Spark for cleansing and wrangling your data.
Duplicate values
Here, we set up our example DataFrame:
data_frame = spark.createDataFrame(data = [("Brian," "Engr," 1), ("Nechama", "Engr", 2), ("Naava", "Engr", 3), ("Miri", "Engr", 4), ("Brian", "Engr", 1), ("Miri", "Engr", 3), ], schema = ["name", "div", "ID"])
The first method...