-1
I have the following dataset
I’m trying to create a dataset based on the dataset above.
I am trying to search row by row values that are not Nan, export to a new dataset this value linked to column 'CO_OCDE'
Ex. At index 0 - The only value notnull()
is the 2.5
So in the new dataset I want to get is:
But I found another "problem" in some lines there are duplicate values and need to remove them too to get the result above.
What I tried to
https://stackoverflow.com/questions/41337477/select-non-null-rows-from-a-specific-column-in-a-dataframe-and-take-a-sub-select
ex4_desc_y.loc[ex4_desc_y['NU_INTEGRALIZACAO_VESPERTINO', 'NU_INTEGRALIZACAO_NOTURNO', 'NU_INTEGRALIZACAO_INTEGRAL', 'NU_INTEGRALIZACAO_MATUTINO', 'NU_INTEGRALIZACAO_EAD'].notnull()]
And if you have two different values in a row? What to do?
– Paulo Marques
I checked, all repeating values are equal, sorry I didn’t put that information above
– Luis Henrique Batista