starboard-notebook
starboard-notebook copied to clipboard
Js exception with pandas - df[‘a’] / df.a
Confirmed the issue on multiple devices/browsers
https://starboard.gg/unhott/Js-exception-pandas-nwAFWup
When trying to index into a dataframe to get a series, js raises this error.
“ TypeError undefined is not an object (evaluating '$.replace')”
Actually, the error is slightly different on Firefox 103.0.2
'TypeError $ is undefined'
I can confirm the above code works on https://pyodide.org/en/stable/console.html which not only runs code but handles console output which is likely handling the output for df.a.
from pyodide.console import PyodideConsole
It does not appear the Starboard-python handles console output, @gzuidhof may have some thoughts on this.
As a workaround you can convert your output to a string and it will display.
str(df.a)
or
df['a'].to_numpy()
This does look like an error yeah, it seems to be related to Starboard trying to display LaTeX output correctly, other than that I don't currently have the time to debug it :/