ipysigma
ipysigma copied to clipboard
TypeError: Object of type int64 is not JSON serializable
Oops I used pandas
import pandas as pd
table = pd.read_csv(file)
graph = table_to_bipartite_graph(
table,
first_part_col="nom",
second_part_col="mentions",
first_part_data=["sexe", "twitter_description", "twitter_followers"]
)
Sigma(graph, node_color="part", node_size="twitter_followers").to_html("graph.html")
TypeError: Object of type int64 is not JSON serializable
I propose to cast int64 as serializable JSON ints if they don't exceed 53 bits. Else, we should raise an error explaining those values should be cast to string instead.