Databricks notebook how to add a title to a cell - databricks

How to add title to the cell itself like this (The tile and the code are in the same command cell):
Instead of putting it in a separate cell like this (The tile and the code are in different command cells):

Maybe you want which will give you

Related

Generate dynamic images based on the values in a column of data

I'm trying to find a way to automatically generate images in a column based on the values in another column (The application is adding rebar images to an excel file that is exported from BIM software).
I have managed to get dynamic images using the 'define name' tool to define a name with the following formula:
=INDEX(Sheet1!$B$2:$B$4;MATCH(Sheet1!$F$2;Sheet1!$A$2:$A$4;0))
I have linked an image to this formula to make it dynamic. However I am stuck on the last step, where I want to apply this principle to an entire column where each image is based on the value in column F in its corresponding row. I have tried adjusting the formula to
=INDEX(Sheet1!$B$2:$B$4;MATCH(Sheet1!$F$2:$F$500;Sheet1!$A$2:$A$4;0))
But this did not change the behavior.
I was hoping to have the column of dynamic images change based on the cell next to it (so if I paste the column of dynamic images in column G I want the image in G5 to be based on the value in F5, G6 based on F6, ...)
All the images are however based on the value in F2.
What I want to achieve
Sample file: https://wetransfer.com/downloads/94a6b73b1bd8408638f614c4bd965dee20191031090453/e01ddc
I am having the same issue. I know you need to use image links. Indirect might work, but I haven't figured it out yet.
This is the only thing that I have found but it would require a defined name for each row:
computergaga.com/blog/create-a-picture-lookup-in-excel
Let me know if you find something better

How to insert variables into a text cell using google colab

I would like to insert a python variable into a text cell, in google colab.
For example, if a=10, I would like to insert the a into a text cell and render the value.
So in the text cell (using Jupyter Notebook with nbextensions) I would like to write the following in the text cell:
There will be {{ a }} pieces of fruit at the reception.
It should show up as:
There will be 10 pieces of fruit at the reception.
The markdown cheatsheets and explanations do not say how to achieve this. Is this possible currently?
It's not possible to change 'input cell' (either code or markdown) programmatically. You can change only the output cells. Input cells always require manually change. (even %load doesn't work)

Using Excel, how to find parent cell in a hierarchy?

Am running Excel 2013 on Windows 10 with 16 GB memory.
I have a hierarchical structure similar to figure 1 below. My structure is 1000+ rows and as deep as 27 levels.
For a "tree" as depicted above, how to identify the parent of a cell?
Here's what I've done so far. Using conditional formatting, and this formula:
=AND(A1<>"",OFFSET(A1,1,1)="")
I am able to identify the leaf nodes of the tree, as shown in figure 2 below.
Now I need to find the immediate ancestor (parent) of every cell (child) in the tree (with the exception of the first row that does not have a parent).
Figure 3 (below) shows an example done manually:
Further, I can associate the tree with an outline.
Then I am able to count the number of decimals in the outline in order to track level changes using this formula:
=LEN(A2)-LEN(SUBSTITUTE(A2,".",""))
as shown in figure 4 below:
How to programmatically accomplish what was done manually in figure 3?
For each row (recorded in a column outside of the tree), print the location of the cell that is the parent of the cell.
Here is a similar question that manually provides "level" information.
How to find parent in an indented hierarchy?
In my case, I need to work from an outline (as shown) or by using a formula for Conditional formatting.
According to your rules, the parent of a cell is the first non-empty cell, bottom to top, in the column immediately to the left:
public function GetParentCell(byval c as range) as range
set GetParentCell = c.offset(0,-1).end(xlUp)
end function
Having put this in a module, you can use it from the sheet, e.g.
=CELL("address", GetParentCell(D4))
to display the address of the parent of D4.
If you want to avoid VBA completely, you have to find a way to convert End(xlUp) into a formula which may prove difficult because Excel lookups work from top to bottom and you want the other way round. If I was to do that, I would start from Last non-empty cell in a column.
Given that the hierarchy is contained in A1:G19:
In H1, put:
=MATCH("x",$A1:$G1,0)
In I1, put
=CELL("address",INDEX(INDEX($A$1:$G$19,1,H1-1):INDEX($A$1:$G$19,ROW(),H1-1),MAX((INDEX($A$1:$G$19,1,H1-1):INDEX($A$1:$G$19,ROW(),H1-1)<>"")*(ROW(INDEX($A$1:$G$19,1,H1-1):INDEX($A$1:$G$19,ROW(),H1-1))))))
as an array formula (CTRL+Shift+Enter).
The credit goes to https://stackoverflow.com/a/5442955/11683 because it is nothing more than a dynamic version of =INDEX(A:A,MAX((A:A<>"")*(ROW(A:A)))).
Drag everything down.
The formula in column I returns the parent of each cell as a true reference which is then examined by the CELL() function to show the address. You can remove the CELL() and use the calculated reference in a different way.

How to recreate this type of map in Excel?

Above is the map I want to recreate in Excel. My data are listed below:
Region People Percentage
South 3,919,780 32.50%
Midwest 2,533,333 21.01%
Northeast 2,686,860 22.28%
West 2,919,833 24.21%
Can anyone please advise on how to start this in Excel? Or, will I need to use different software? I'm using Excel 2007 on Windows, for reference.
You can do that in Excel, and it won't be too hard really. I assume that you already have the map you show in an image form?
You could import the map into Excel, then insert text boxes over the different regions you have. Then, instead of typing INTO the text box, you can use a formula to refer to a cell with a value.
Say your "South" Percentage (32.50) is in Sheet2, Cell C3. Just use the formula =Sheet2!C3 as the Text Box contents, and you'll see the text box update itself as C3 changes.
Screenshot
So instead of typing =Sheet2!C3 or whatever into the text box itself, do so in the formula bar.
If you need to add the map, I've done something like this in the past, so just Google around for SVG or other images, and use that as your background to put the input boxes over.

Concatenating Text in a Chart Series Name Box

I am trying to alter a chart legend / series name to concatenate some additional text to the series label from the original data set. Following the instructions found here, I get to the Select Data Source dialog, where I select the legend entry I want to change from the Legend Entries (Series) box, and then click Edit. That brings up this dialog:
What I want to do is concatenate some words to the original series label coming from that DATA!$C$3 field, like so:
However, when I do that, I get the familiar "The formula you typed contains an error" dialog. This to me is strange, because what I have there is a legal formula. It's almost as if only a subset of the formula syntax is supported in this dialog.
Is there a correct syntax or workaround for accomplishing this?
Although Jon Peltier credits "The series formula is an Excel formula like any other." it does seem a little quirky to me. He also mentions:
The Series Name can be blank, a text string in double quotation marks, a reference to a worksheet range (one or more cells), or a reference to a named range (named formula).
For simplicity, if viable you might consider going to Data!C3 and changing whatever is there (eg x) to:
="x"&"(Rt. Axis)"

Resources