test_arr = pd.Series(["Abby", "Michael","Abby"])
test_arr[test_arr.map(lambda x: x.upper() == "ABBY")]
I don't understand how this works map works with the subscript i.e. []:
map_results = test_arr.map(lambda x: x.upper() == "ABBY")
test_arr[map_results]
I printed the output of map_results function and it returns an array of boolean. How does this [TRUE, FALSE, TRUE] map to an index/element exactly? Does pandas override the susbcript?