Sorry for a stupid question. I think I need some basics refreshed to answer a problem I'm trying to solve.
Say I'm reading a list in excel like
| x | y |
|---|---|
| a | team a |
| b | team a |
| c | team b |
| d | team b |
If I wanted to look up each x values' y companion using pandas in python, how would I go about this? I'm a little unfamiliar with the process of linking data.
For example looking up c would return team b.
EDIT I'm basically trying to figure out, if y column == team a, then print all of the x values corresponding to team a.
for i in teams:
if Table.loc[(Table['x']==i)]:
print(Table.loc[(Table['y'])])
groupby.for name, g_df in df.groupby('y'):wherenameis the name group,team a,team band g_df is the corresponding DataFrame with those values.