Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to drop rows according to a specific numezrical colum entry

I ask the following question which is more pure Python than Sage, since I am mixing both.

I have a dataframe and one column looks like that

image description

I would like to keep only the non rows or to drop the numeric ones. I have not found a way to do that in Pandas. As you see the numerical values can change --- in the contrary it would be easy.

How to drop rows according to a specific numezrical colum entry

I ask the following question which is more pure Python than Sage, since I am mixing both.

I have a dataframe and one column looks like that

image description

I would like to keep only the non rows or to drop the numeric ones. I have not found a way to do that in Pandas. As you see the numerical values can change --- in the contrary it would be easy.

How to drop rows according to a specific numezrical colum numerical column entry

I ask the following question which is more pure Python than Sage, since I am mixing both.

I have a dataframe and one column looks like that

image description

I would like to keep only the non rows or to drop the numeric ones. I have not found a way to do that in Pandas. As you see the numerical values can change --- in the contrary it would be easy.

When I try something like

feuille_utilise[feuille_utilise['Entreprise liƩe'].str.contains("non")]

I obtain the following message

Cannot mask with non-boolean array containing NA / NaN values