Deep Learning Nerds Academy
The ultimate Learning Platform for AI, Data Science, Data Analytics and Data Engineering.

PySpark - Replace Null Values in a DataFrame

PySpark - Replace Null Values in a DataFrame

Introduction In this tutorial, we want to replace null values in a PySpark DataFrame. In order to do this, we use the the fillna() method of PySpark. Import Libraries First, we import the following python modules: from pyspark.sql import SparkSession from pyspark.sql.functions import mean Create SparkSession Before...

PySpark - Remove Null Values from a DataFrame

PySpark - Remove Null Values from a DataFrame

Introduction In this tutorial, we want to drop rows with null values from a PySpark DataFrame. In order to do this, we use the the dropna() method of PySpark. Import Libraries First, we import the following python modules: from pyspark.sql import SparkSession Create SparkSession Before we can work with...

PostgreSQL - SUM

PostgreSQL - SUM

Introduction In this tutorial, we want to calculcate the sum of values of a specific column. In order to do this, we use the SUM function. We have already created the table student with the following data: Example 1 We want to calculcate the sum of credit points of all...

PostgreSQL - COUNT DISTINCT

PostgreSQL - COUNT DISTINCT

Introduction In this tutorial, we want to count the number of unique values of a specific column. In order to do this, we use the COUNT function with the DISTINCT keyword. We have already created the table student with the following data: Example 1 We want to count the number...

PostgreSQL - COUNT

PostgreSQL - COUNT

Introduction In this tutorial, we want to count the number of values of a specific column. In order to do this, we use the COUNT function. We have already created the table student with the following data: Example 1 We want to count the total number of students. In order...

PySpark - Remove Duplicates from a DataFrame

PySpark - Remove Duplicates from a DataFrame

Introduction In this tutorial, we want to drop duplicates from a PySpark DataFrame. In order to do this, we use the the dropDuplicates() method of PySpark. Import Libraries First, we import the following python modules: from pyspark.sql import SparkSession Create SparkSession Before we can work with Pyspark, we need...

PostgreSQL - SELECT WHERE

PostgreSQL - SELECT WHERE

Introduction In this tutorial, we want to select data from a table that satisfy a certain condition. In order to do this, we use the SELECT Statement with the WHERE Clause. We have already created the table student with the following data: Example 1 We want to select all columns...

PostgreSQL - ORDER BY

PostgreSQL - ORDER BY

Introduction In this tutorial, we want to select data from a table and sort the result set. In order to do this, we use the SELECT Statement with the ORDER BY Clause. We have already created the table student with the following data: Example 1 - Sort rows in ascending...

PostgreSQL - LIMIT

PostgreSQL - LIMIT

Introduction In this tutorial, we want to select a specific number of rows from a table by using a SQL Statement. In order to do this, we use the SELECT Statement with the LIMIT Clause. We have already created the table student with the following data: SQL Statement We want...

You’ve successfully subscribed to Deep Learning Nerds | The ultimate Learning Platform for AI and Data Science
Welcome back! You’ve successfully signed in.
Great! You’ve successfully signed up.
Success! Your email is updated.
Your link has expired
Success! Check your email for magic link to sign-in.