About big data
in a data frameA
11
12
13
13
14
11
15 When it's like this, add item B next to A.
A B
11 a
12 b
13 cu
13 cu
14 r
11 a
15 m
I want to put it up like this. It's hard to put it in one by one because it's a lot. Is there a way to check two numbers in item A and create item B to display the letters that fit the number in item A?
bigdata python
import pandas as pd
df = pd.DataFrame ({'A': [11, 12, 13, 14, 15], 'B': ['',', '',', '',', '',']})
data = pd.DataFrame({'A':[11, 12, 13, 13, 14, 11]})
data = data.merge(df)
print(data)
© 2024 OneMinuteCode. All rights reserved.