#DataframeMethod
In PySpark, .join() is a method used to perform joins between two DataFrames or RDDs. It allows you to combine data from multiple datasets based on a common key.

Syntax: -

DataFrame.join(other, on=None, how=None)

For performance, consider using broadcast joins for smaller DataFrames. Example: -

from pyspark.sql.functions import broadcast
result = df1.join(broadcast(df2), on="id", how="inner")