I am trying to automate my classroom, and I'm hitting a wall with comparing my total list of students to a dataframe that has classes and students. Ultimately, the code would return a list of full classes.
First, my total students list is called all_kids.
all_kids=['Kevin', 'Jack', 'Caroline', 'Grace', 'Harry', 'Sam']
df_kids=pd.DataFrame(all_kids)
Then, my class info is in a CSV file, where one column is the class period and one column is the students in that class
| Name | Kids |
|---|---|
| English | Kevin, Jack, Sam, Richard |
| Math | Caroline, Kevin, Harry, Grace |
Is there a way to compare my total list of kids to the kids in each class and return something like this:
| Name | Kids | Status |
|---|---|---|
| English | Kevin, Jack, Sam, Richard | Not Full |
| Math | Caroline, Kevin, Harry, Grace | Full. |
Here, Math is full because those four kids all appear in all_kids, but English is not full because Richard is not included in all_kids.
Thanks!