Skip to content

Tag: group-by

Pandas: filter on grouped and aggregated dataframe

I have a dataframe 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: After I get this:…

Groupby mean doesn’t display all data

I want to see all the means of the numerical columns, grouped by position, using When I do this I only get 3 of the many columns The other columns are all integers or floats, and they have no NAs. If I do Then I get the correct output. How can I display weight using groupby? Thanks for any help