cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

New to Spark

Anku_
New Contributor II

Hi all,

I am new to Spark, trying to write below code but getting an error.

Code:

df1 = df.filter(df.col1 > 60 and df.col2 != 'abc')
 
Any suggestion?
 
1 ACCEPTED SOLUTION

Accepted Solutions

Kaniz_Fatma
Community Manager
Community Manager

Hi @Anku_ , use this instead :-

df1 = df.filter((df.col1 > 60) & (df.col2 != 'abc'))

View solution in original post

1 REPLY 1

Kaniz_Fatma
Community Manager
Community Manager

Hi @Anku_ , use this instead :-

df1 = df.filter((df.col1 > 60) & (df.col2 != 'abc'))

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group