cancel
Showing results for 
Search instead for 
Did you mean: 
Machine Learning
Dive into the world of machine learning on the Databricks platform. Explore discussions on algorithms, model training, deployment, and more. Connect with ML enthusiasts and experts.
cancel
Showing results for 
Search instead for 
Did you mean: 

Muliple Where condition vs AND && in Pyspark

User16826994223
Honored Contributor III

.where((col('state')==state) & (col('month')>startmonth)

I can do the where conditions both ways. I think the one below add readability. Is there any other difference and which is the best?

.where(col('state')==state)

.where(col('month')>startmonth)

1 REPLY 1

User16826994223
Honored Contributor III

You can use explain to see what type of physical and logical plans are getting created . This is the best way to see difference , but as mentioned in the question , it should give the same physical plan

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now