When using TextDataBunch.from_csv from a saved DataFrame

When using TextDataBunch.from_csv from a saved DataFrame…

If you get the error “Your validation data contains a label that isn’t present in the training set, please fix your data”, you may have saved your csv file with an index (default pandas option). Posting this encase anyone comes across this problem and searches (hopefully now successfully) for a solution.

1 Like