I am trying to make a subselection of a dataframe based on some columns, while at the same time filtering the dataframe based on a different column. In SQL it looks like this:>
An alternative way:
df[df['col4']==3].filter(['col1', 'col2', 'col3'])