Skip to content
Advertisement

Pandas: filter on grouped and aggregated dataframe

I have a which is based on a read-in excel list. The data has multiple columns and rows with one unique identifier. I want to plot the data through a PyQT interface based on some user selection (checkboxes), but I cannot select one unique row for plotting.

The data looks like this:

JavaScript

After

JavaScript

I get this:

JavaScript

I can use this for plotting e.g. with . However, after the user makes a selection, only that specific experiment is supposed to be plotted (e.g. Exp3).

I tried filtering on the aggregated list with

JavaScript

but it says that 'function' object is not iterable and I have a feeling this is the wrong approach.

Is there a way for me to get for example the index of the Experiment name (e.g. Exp3) so that I can access it this way or can someone explain how I could filter or access one of the rows based on the string/experiment key?

Advertisement

Answer

JavaScript

output:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement