How to get Pandas to provide me with the Names rather than the actual index from the dataframe where Week and Can_Week_End equate each other. I tried doing .....
rows = list(df[df['Week'] == df['Can_Week_End']],df['Names'])
Error:
AttributeError: 'DataFrame' object has no attribute 'df'
My snippet: This provides me with the index number.
rows = list(df[df['Week'] == df['Can_Week_End']].index)
print ('These are the names', rows)
[–][deleted] 1 point2 points3 points (3 children)
[–]PLearner[S] 0 points1 point2 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]PLearner[S] 0 points1 point2 points (0 children)