1

I am trying to concatenate the following two arrays of the following format (strings only):

series1 = ["a","b","c","d","e"]
series2 = ["b","c"]

What I need is a pandas dataframe / array of the following structure i.e. array elements are matched:

series1 series2
a NaN
b b
c c
d NaN
e NaN

Any direction on how to properly merge these two arrays would help. Thank you very much.

noah
  • 2,616
  • 13
  • 27
  • 2
    Does this answer your question? [Pandas Merging 101](https://stackoverflow.com/questions/53645882/pandas-merging-101) – noah Feb 09 '21 at 00:22
  • Are the values in the two series all unique? Are the elements in series2 guaranteed to exist in series1? If not, you have to explain what should happen (e.g. what is the result of merging `a b c b c d e c` and `b a f`). – Amadan Feb 09 '21 at 00:25
  • The values in the two series are all unique. The idea is to create an overview table of which IDs (string format i.e. "a", "b", "c" etc.) can be matched across datasets. – concatenator Feb 09 '21 at 00:27

0 Answers0