Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bioframe.assign_view drop_unassigned drops all NaNs? #160

Open
Phlya opened this issue May 31, 2023 · 3 comments
Open

bioframe.assign_view drop_unassigned drops all NaNs? #160

Phlya opened this issue May 31, 2023 · 3 comments
Labels

Comments

@Phlya
Copy link
Member

Phlya commented May 31, 2023

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, :]

@gfudenberg
Copy link
Member

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

@Phlya
Copy link
Member Author

Phlya commented Dec 20, 2023

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

@iqraakhtar09
Copy link

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
Labels
Projects
None yet
Development

No branches or pull requests

3 participants