Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to subset RPy2 data frames by single or multiple criteria
# By single criteria
subset_frame = dataframe.rx(dataframe.rx2('input_type').ro == 'VALUE', True)
# By Multiple Criteria
subset_frame = all_data_frame.rx((dataframe.rx2('input_type').ro == 'VALUE1').ro &
(dataframe.rx2('data_type').ro == 'VALUE2'), True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment