You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So to_json first converts all the a DataFrame by using .values. This converts everything to object dtype (if its a mixed frame) and is pretty expensive perf wise.
If you do this column by column you get excellent perf (and tiny bit more complexity in the code).