what is the pandas equivalent of
SELECT Column2
FROM DF
WHERE column3 ="value"
when we are using dataframe please
THANK YOU
You can use .loc
and a conditional statement on a Dataframe to select out relevant information, similar to a where clause. You can pull out your desired column(s) using a second argument to loc
, e.g.
df.loc[df[column3]==“value”, [column2]]