# also getthem into a dataframe into one column, but add a second column to label source list = np.concatenate([list1,list2]) lables = ['l1']*len(list1)+['l2']*len(list2) d = {'x':list,'label':lables} df = pd.DataFrame(d) display(df)
x
label
0
49
l1
1
93
l1
2
38
l1
3
96
l1
4
32
l1
...
...
...
1995
18
l2
1996
102
l2
1997
1
l2
1998
175
l2
1999
77
l2
2000 rows × 2 columns
method 1, overlay dataframe columns with different labels
Reprint policy:
All articles in this blog are used except for special statements
CC BY 4.0
reprint policy. If reproduced, please indicate source
robot learner
!