-1

raise ValueError(f"orient '{orient}' not understood") Python

  • Post the full traceback message, not a vague description of where it happens. – tdelaney Dec 08 '20 at 23:43
  • Please supply the expected [minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). Show where the intermediate results differ from what you expected. We should be able to copy and paste a contiguous block of your code, execute that file, and reproduce your problem along with tracing output for the problem points. This lets us test our suggestions against your test data and desired output. You posted ~50 lines of code with multiple processing blocks. Isolate this to a particular snippet of code. – Prune Dec 08 '20 at 23:47
  • Please [include a minimal data frame](https://stackoverflow.com/questions/52413246/how-to-provide-a-reproducible-copy-of-your-dataframe-with-to-clipboard) as part of your MRE. Do not burden us with an input file and that processing, unless you have isolated the problem to that process. – Prune Dec 08 '20 at 23:48

1 Answers1

1

You have tn.to_dict(orient='nutrients').

The orient parameter for DataFrame.to_dict() accepts any of {‘dict’, ‘list’, ‘series’, ‘split’, ‘records’, ‘index’}. "nutrients" is not one of those values.

Brad Solomon
  • 34,372
  • 28
  • 129
  • 206