Coupling Python and Observable using ojs_define()

quarto
Author

Teresa Kubacka

Published

July 30, 2022

See src and this Issue

import pandas as pd 
my_variable = pd.Series([0,1,2,3])
ojs_define(my_variable = pd.DataFrame(my_variable)) # this works
ojs_define(my_variable2 = my_variable.tolist()) # this works
# ojs_define(my_variable = my_variable) # this doesn't
my_variable