Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Whatever
only keep rows of a dataframe based on a column value
Chappo
Programming language:
Whatever
2021-07-24 07:32:06
0
Q:
only keep rows of a dataframe based on a column value
Hailey08
Code:
Whatever
2021-08-08 06:04:18
df.loc[df['column_name'] == some_value]
5
poisson
Code:
Whatever
2021-02-22 22:19:54
df.loc[(df['column_name'] >= A) & (df['column_name'] <= B)]
3
Tags
value
data
row
frame
dataframe
rows
base
Related
return rows based on column
filter dataframe based on condition into new dataframe
how to keep only certain columns in dataframe
new dataframe based on certain row conditions
New to Communities?
Join the community