Python Forum
Panel Data Cleaning Drop Identity - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: Panel Data Cleaning Drop Identity (/thread-23661.html)



Panel Data Cleaning Drop Identity - luxlambo - Jan-11-2020

Dear all,

I am struggling to drop the complete identity in a Panel data set when the identity has a missing time value in the given range.
In this example I would like to drop every row of the idenity because the year 1993 is missing.

1990 Idenity1
1991 Idenity1
1992 Idenity1
1994 Idenity1

Thank you and have a nice Weekend.

Kind regards,

Max


RE: Panel Data Cleaning Drop Identity - jefsummers - Jan-13-2020

1. Please post what you have tried
2. Do you mean Pandas dataset? Not familiar with Panel
3. So all 4 of those rows would be dropped because 1993 is missing. That is odd enough there may not be a simple single command to do this. Suggest looping through the dataset and verifying criteria, dropping rows as needed
4. Alternatively, create a second dataset and only add rows to that dataset when the criteria are met. Build it up like this or delete it out as in 3.