# How to change the keys names in dataset

As you can see from the picture, I want to change the keys names of the list. There are 14314 keys names, but they are all mess, I want to change it with a list of continuous numbers like Range[14314]. But I don't know how to do it.

As an example, we'll use the built-in Titanic dataset

f = ExampleData[{"Dataset", "Titanic"}][GroupBy["class"]];


A Dataset can be converted to an an Association/List form by using the Normal function, e.g.,

Normal[f]


What you want to do is replace the keys and re-convert this into a Dataset, which is easily accomplished by:

With[
{values = Values@Normal[f],
newGroups = Range@Length[f]  },