添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Databricks Community

I defined a dictionary variable Dict, populated it, and print(dict) in the first cell of my notebook. In the next cell, I executed the command print(dict) again. However, this time it gave me an error

NameError: name 'Dict is not defined

How can that be? Why am I able to print this variable in one cell, but unable to do so in the next cell?

I can confirm that your answer at least pointed me in the right direction.

It seems my issue wasn't exactly the same as I was instead using the magic pip command to install a notebook scoped package:
%pip install <some-package>

Anything defined within that command cell seems to be lost so I had to separate this into it's own command before everything else.

Thank you for the help!

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group ! If there isn’t one near you, fill out this form and we’ll create one for you to join!

Spark structured streaming - not working with checkpoint location set in Data Engineering Handling Aggregations in Feature Function in Data Engineering Unable to enforce schema on data read from jsonl file in Azure Databricks using pyspark in Data Engineering © Databricks 2024. All rights reserved. Apache, Apache Spark, Spark and the Spark logo are trademarks of the Apache Software Foundation.
  • Privacy Notice
  • Terms of Use
  • Your Privacy Choices
  • Your California Privacy Rights
  •