-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rows x columns is not JSON serializable? #157
Comments
I have tried another method "Caching and Signaling" without using to_json. But it turned out to be the same issue.
|
here is code I used:
here is the error message:
csv file: |
It looks like you're returning a Pandas DataFrame and Series from your callback. Dash callback return values need to be serialised into JSON to be sent to the client. The JSON encoder that's being used (looks like it could be either What you probably want to do is just convert the results of your callbacks into data structures that can be encoded automatically, such as lists and dictionaries. For example, with the callback that returns a column, I think you could return |
@ned2 Thanks for your suggestion. I have tried it out but it turned out to be the same error. I think I may need to slice the dataframe into lists. |
For future googlers, see https://community.plot.ly/t/rows-x-columns-is-not-json-serializable/6747/3 for a continuation of this topic. |
I am trying to share the data between callbacks with "Storing Data in Hidden Div" method.
it turns out to be an error message.
The text was updated successfully, but these errors were encountered: