enter image description here

As you can see from the picture, I want to get the rows in a14 that contains all of the a15 elements in them. By the way a15 is a part of the 1st column of a14.


a14=PrependTo[a13, a12] // Transpose // Dataset

a15=List /@ Intersection[a12, key]
  • $\begingroup$ What are key, a12, a13? It is not clear what you are trying to do. $\endgroup$ Mar 30 '21 at 16:29
  • $\begingroup$ isd = Import[ "D:/week/Introduction to Data Science/Final \ project/OneDrive_1_2021-2-27/isd-history.csv", "Data"] // Dataset; usaf = isd[[All, 1]] // Normal; wban = isd[[All, 2]] // Normal; usafwban = Thread[usaf -> wban]; a12 = StringReplace[ToString /@ usafwban, "->" -> ""]; a13 = isd // Normal // Transpose $\endgroup$ Mar 31 '21 at 5:25
  • $\begingroup$ key is the 1st column of the other dataset which is similar to a14, I want to find their intersection. And return the rows of a14 that only contain their intersection. $\endgroup$ Mar 31 '21 at 5:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.