Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does the id field, eg "wound-transition" in a jupyter notebook come from and what does it mean?

If you look at the raw JSON of a jupyter notebook (python in this case), each cell has a field labeled "id", and they seem to be made up of hyphenated random word pairs, and are often rather funny. A couple random examples:

 "id": "rough-girlfriend",
 "id": "wound-transition"
 "id": "orange-biography"
 "id": "mediterranean-viking",

I've done some googling but I can't seem to find any information on these fields! What do they mean? Where do they come from? How are they generated?

Any info much appreciated.

like image 966
Jazz Weisman Avatar asked Mar 17 '21 17:03

Jazz Weisman


1 Answers

Essentially, it seems they are meant to provide human-readable cell identifiers. There is a longer explanation of the need for such fields in the enhancement proposal. The document also points to the exact implementation in nbformat.

They are quite funny, as they are made of a random noun and a random adjective. I personally find them rather annoying though, as they tend to change unexpectedly, making git diffs ugly.

like image 104
Paul S. Avatar answered Sep 19 '22 10:09

Paul S.