We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59a68a4 commit 0b08e42Copy full SHA for 0b08e42
convokit/model/corpus.py
@@ -1548,9 +1548,10 @@ def from_pandas(
1548
df["id"] = df.index
1549
1550
# checking if dataframes contain their respective required columns
1551
+ missing_fields = pd.Index(columns).difference(utterances_df.columns)
1552
assert (
- pd.Series(columns).isin(utterances_df.columns).all()
1553
- ), "Utterances dataframe must contain all primary data fields"
+ len(missing_fields) == 0
1554
+ ), f"Utterances dataframe is missing the following required fields: {list(missing_fields)}"
1555
1556
utterance_meta_cols = extract_meta_from_df(utterances_df)
1557
0 commit comments