Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Filters rows using the given condition

# Filters rows using the given condition

df.filter(df.age > 3).collect()
# [Row(age=5, name='Bob')]
df.where(df.age == 2).collect()
# Row(age=2, name='Alice')]

df.filter("age > 3").collect()
# [Row(age=5, name='Bob')]
df.where("age = 2").collect()
# [Row(age=2, name='Alice')]
Comment

PREVIOUS NEXT
Code Example
Python :: Gets an existing SparkSession or, if there is no existing one, creates a new one based on the options set in this builder 
Python :: arrotondamento python 
Python :: data exfiltration icmp 
Python :: Prints out the schema in the tree format 
Python :: how to get only non-blank entry of list in python 
Python :: pandas filter rows by fuzzy values 
Python :: openpyxl _cells_by_row 
Python :: tensorflow loop csdn 
Python :: create a typo with python 
Python :: sns.distplot fit 
Python :: introduction python graphviz simple graph examples 
Python :: convert python to c++ online 
Python :: pandas seaborn distplot 
Python :: how to use drop for file in python 
Python :: qt platform plugin could not be initialized stackoverflow 
Python :: Fish market linear regression implementattion 
Python :: how to form a list from a file in python 
Python :: pip django graphql 
Python :: sring to name variable pyton 
Python :: cairo.context transform vertical text python 
Python :: Feature Importance 
Python :: save changes flask sqlalchemy 
Python :: cptac dataset 
Python :: python declare immutable variable 
Python :: streamlit altair 
Python :: How to derive using sympy 
Python :: how to increase existing length with null python 
Python :: List Creating List 
Python :: create Charles certificate 
Python :: Python multiline comment using docstrings 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =