I have two different dfs with the following columns:
col1 col2
0 programming 0 programming
1 chess 1 python
2 leadership 2 leadership
3 abba
4 games
I want to find what percentage of values of col1 present in col2
For that, I thought I could construct a new df which will contain the same values and then its len to len(col2). First I want to get this:
col3
0 programming
1 leadership
Here is what I tried, but I dont want to use two for loops
bb=[]
for i in company.col2:
for b in student.col1:
if i==b:
bb.append(i)