Skip to content

removing missing values from coloumns #1919

Answered by Hasham04
Hasham04 asked this question in Q&A
Discussion options

You must be logged in to vote

One approach that I tried was to filter each column so

df_col1_filtered=df_unfiltered[df_unfiltered.col1!='']
df_col2_filtered=df_unfiltered[df_unfiltered.col2!='']

when I describe this data I get an equal number of counts of rows. but when I try to join them like this.

df_col1_filtered.drop(col2,inplace=True)
df_col2_filtered.drop(col1,inplace=True)

joined=df_col1_filtered.join(df_col2_filtered)

I get an unequal number of rows being merged error.

I would appreciate any suggestions to solve the problem I mentioned in question or any insight on what I am doing wrong with my approach. Thank you for your help.

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@Hasham04
Comment options

@maartenbreddels
Comment options

@Hasham04
Comment options

@JovanVeljanoski
Comment options

@Hasham04
Comment options

Answer selected by Hasham04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants