I am having a strange problem with the Pandas.isin () method. I am doing a project in which I need to identify bad passwords by length, general word / password lists, etc. (Do not worry, this is from a public source). One way is to find out if someone is using their name as a password. I use .isin () to determine if this is the case, but it gives me weird results. To show:
# Extracting first and last names into their own columns users['first_name'] = users.user_name.str.extract('(^.+)(\.)', expand = False)[0] users['last_name'] = users.user_name.str.extract('\.(.+)', expand = False)
The result of this:
password user_name first_name last_name uses_name 7 murphy noreen.hale noreen hale True 11 hubbard milford.hubbard milford hubbard True 22 woodard jenny.woodard jenny woodard True 30 reid rosanna.reid rosanna reid True 58 golden rosalinda.rodriquez rosalinda rodriquez True
This is mostly good; milford.hubbard uses hubbard as a password, etc. But then we have a few examples, such as the first. Norina Hale is noticed, despite the fact that her password is "muddy", which has only one letter with her name.
I canβt understand for life what causes this. Does anyone know why this is happening and how to fix it?
tq343 source share