Open danielspringt opened 1 year ago
Note that after filtering, the index is not reset.
Instead, try this:
dat = (penguins >> sb.filter(_.island != "Torgersen")).reset_index(drop=True)
I've encountered similar issues in R, the resolution of which was droplevels()
Also, running this will perhaps shed a bit more light on discrepancy between output above and expected output.
(
penguins
>> group_by(
_.island
)
>> count()
>> arrange(-_.n)
)
Hi - the following example produces strange results:
I use a filter to drop some of the rows. When using mutate on the filtered dataframe the previously dropped rows somehow still appear in the dataframe.
I would expect a count output like:
but the dropped observations get labeled with NaN
What am I doing wrong?