CheatSnip

Related

Create DataFrame

pyspark

Create DataFrame from list or RDD

Show DataFrame

pyspark

Display rows of DataFrame

Print Schema

pyspark

Print schema of DataFrame

pyspark/where

Where

Alternative to filter()

pyspark
dataframe
where

Command

df.where()

Explanation

Works the same as filter() for conditions.

Examples

Filter rows with age = 30

df.where(df.age == 30).show()

More

Select Columns

pyspark

Select specific columns from DataFrame

Filter Rows

pyspark

Filter DataFrame based on condition

Group By

pyspark

Group DataFrame by column(s)

CheatSnip

Lightning-fast access to essential developer commands

Git CommandsDockerNPMKubernetes

Created by Poorna Prakash

© 2025 CheatSnip. All rights reserved.