Is it possible to change field label in Inputs.table?

I have built my first notebook and I have an Input.table in which I would like to change some field label (in example change Costo complessivo in Costo complessivo (€).
Is it possible to do it? If yes, how to do it?

Thank you

1 Like

It seems there should be a more efficient approach, but one way to accomplish this is to simply rename the column when you load the data. That might look something like so:

data = {
  let data = await d3.json(
  data.forEach(o => o['Costo complessivo (€)'] = o['Costo complessivo'])
  return data

I sent you a suggestion that yields the following:

1 Like

You can specify column names with the header option.

  • header - an object of column name to corresponding header; either a string or HTML element.

I am on my phone so tricky to type an example but let me know if you figure it out!
Btw, you can read about the Inputs options in the API docs GitHub - observablehq/inputs: Better input elements

1 Like

Thank you, it’s what I needed

  header: {
    "Costo complessivo": "Costo complessivo (€)"

And thank you also to @mcmcclur

1 Like