Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Comparison
- a = pd.Series(['1','2','3'])
- b = pd.Series([['1','a','b'],['we','po'],['qwe','3']])
- # map(function, iterable, ...) - function is applied over each element in iterable
- # lambda arguments : expression - expression is executed over arguments and returned. ANONYMOUS FUNCTION
- #
- list(map(lambda x : x[0] in x[1] # The lambda fucuntion takes in the tuple in this case and perform the function in the
- ,zip(a,b))) # Here we zip the series a and b creating a list of tuples.
- # Each of these tuples is passed to the lambda function which applies its expression onthe args.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement