Unable to access python variables in-between shells in same notebook
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 01:32 PM
Unable to access Python variables in-between shells in the same notebook even if the entire code is written in Python. Getting error that unable to identify variable in the new cell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 11:33 AM
Hi @sanjanag,
Thank you for posting the question in Databricks Community.
Can you share the minimal code for the repro?
Regards,
Kumaran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2023 01:00 PM
Even Just a simple code like
One cell : import pandas as pd
Second cell : df = pd.read_csv('path')
Error in second cell saying 'pd is not defined'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2023 01:29 PM - edited 07-27-2023 01:30 PM
Hi @sanjanag,
Thank you for the response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2023 11:50 AM
Hi, thanks for your message.
Can you sent a screenshot of your notebook maybe?
This makes it hard to debug what could be the cause of it?
Also which runtime are you using, this could might be the issue.
With my experience loading the pandas library should never be an issue in this way.
Kind regards,

