Skip to content
Advertisement

Pandas Data data frame filtering after using pivot function

Can someone please help me with my current error or suggest another way of doing this ? Thanks a lot in advance

I have bellow data frame given bellow :-

JavaScript

I want to filter the data frame such that it returns me all the rows and the GroupName where one or more of the columns (Type1 /Type2/Type3) has +ve and a -ve value .

OUTPUT in the above df it will return be only

JavaScript

I tried

JavaScript

getting error

JavaScript

I created this df by using a pivot table

JavaScript

Advertisement

Answer

IIUC:

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