I have a pandas pf with these types:
id 14 non-null int64
class 14 non-null int64
action.start 6 non-null float64
action.end 6 non-null float64
action.text 6 non-null object
action.lemma 6 non-null object
When I run df.to_json('output.json',orient='index') (tried any orient option) it keeps crashing and with the error:
OverflowError: Maximum recursion level reached
Any ideas how to resolve this?
Turns out I had some weird object type in the dataframe:
action.text <class 'spacy.tokens.span.Span'>
Turning this into text solved the issue
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With