Skip to content

bioframe.assign_view drop_unassigned drops all NaNs? #160

Open

Description

@Phlya

If you have any other columns in the bedframe that might contain NaNs (bins from a cooler...), they will be also dropped - not what I expected.

out_df = out_df.iloc[pd.isna(out_df).any(axis=1).values == 0, :]

Activity

  1. gfudenberg commented on Dec 20, 2023

    @gfudenberg
    Member

    @Phlya -- couldn't tell from this, did you have a proposed behavior?

  2. Phlya commented on Dec 20, 2023

    @Phlya
    MemberAuthor

    I guess it should drop on a subset of columns, to only actually drop unassigned intervals...

  3. iqraakhtar09 commented on Mar 12, 2024

    @iqraakhtar09

    The line of code you gave channels the DataFrame out_df to eliminate columns with any NaN values. In any case, it's conceivable that this activity could unintentionally drop lines with NaN values in different sections too, in addition to the particular segment being tended to. This conduct probably won't be what you expected, particularly to just drop lines in light of NaN values in a specific section. The code scrap doesn't unequivocally focus on a particular segment for NaN evacuation, so it could not completely live up to your assumptions in the event that you were wanting to hold lines with NaNs in different sections.

    it's my personal thought correct me if i'm wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions