I have two columns:
number
apple 2
banana 3
grape 25
cat 4
jelly 1
I need to find unique values that each category contains. This is how you could create a new df
import numpy as np
import pandas as pd
df = pd.DataFrame({'category':['apple', 'banana', 'grape', 'cat', 'jelly'],
'number':[2,3,25,4,1]})
I have this another df which needs to be filled with the value.
category name number
apple aliya 2
banana reeva 3
apple dev 2
grape ruby 25
cat cosmo 4
jelly jack 1
cat goldy 4
grape frr 25