-
col1 col2 any suggestions on how i can i convert this data to col1 col2 I then want to be able to export it to a CSV. thankyou |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
One approach that I tried was to filter each column so df_col1_filtered=df_unfiltered[df_unfiltered.col1!=''] 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) 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. |
Beta Was this translation helpful? Give feedback.
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.