Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions convokit/model/corpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -1548,9 +1548,10 @@ def from_pandas(
df["id"] = df.index

# checking if dataframes contain their respective required columns
missing_fields = pd.Index(columns).difference(utterances_df.columns)
assert (
pd.Series(columns).isin(utterances_df.columns).all()
), "Utterances dataframe must contain all primary data fields"
len(missing_fields) == 0
), f"Utterances dataframe is missing the following required fields: {missing_fields}"
Copy link
Collaborator

@ethanxia4 ethanxia4 Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could use list(missing_fields) in assert error for slightly more readable formatting, other than that works great


utterance_meta_cols = extract_meta_from_df(utterances_df)

Expand Down