We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently I'm assigning variables using the __builtins__ module.
__builtins__
I think the better way to accomplish this is using the BlockingKernelClient class from the jupyter_client API.
Maybe the following:
from jupyter_client.blocking import BlockingKernelClient kc = BlockingKernelClient() kc.load_connection_info(<connect_info>) kc.start_channels()
Then to create variables do kc.execute('foo = "bar"')
kc.execute('foo = "bar"')
The text was updated successfully, but these errors were encountered:
To pass a dataframe we could do:
code = """ import pandas as pd {0} = pd.DataFrame({1}) {0}.columns = {1}[0].keys() """.format(var_name, data) kc.execute(code)
Something like this should work.
Sorry, something went wrong.
tmthyjames
No branches or pull requests
Currently I'm assigning variables using the
__builtins__
module.I think the better way to accomplish this is using the BlockingKernelClient class from the jupyter_client API.
Maybe the following:
Then to create variables do
kc.execute('foo = "bar"')
The text was updated successfully, but these errors were encountered: