Custom ticktext on multicategory axis

I’m trying to modify (hide) some values in a plot with tickvals and ticktext on my x axis. The problem is that my x axis is multicategory (x=[x1,x2])

Let’s say my data is:

# Making a dummy dataframe
data = pd.DataFrame(
    {
        "company": ["company a", "company b", "company c"],
        "cost": [10, 20, 33],
        "year": [2020, 2021, 2020],
    }
)

# Adding dummy barname column
data["barname"] = [" ", "company b", " "]

So with this, I want to only show company b, and hide company a and c. (The reason I use " " instead of “” is that the latter makes the graph placement weird for some reason)

A working example without multicategory:

fig = go.Figure([go.Bar(x=data.company, y=data.cost)])
fig.update_layout(
    xaxis=dict(
        tickmode="array",
        tickvals=[*range(0, len(data.company), 1)],
        ticktext=data.barname,
    )
)
fig.show()

Trying to hide the company name in a multicategory x-axis:

fig = go.Figure([go.Bar(x=[data.company, data.year], y=data.cost)])
fig.update_layout(
    xaxis=dict(
        tickmode="array",
        tickvals=[*range(0, len(data.company), 1)],
        ticktext=[data.barname, data.year],
    )
)
fig.show()

That doesn’t work.

I found this on Github, where it looks like what I’m trying to do is a dead end:

But I also found this, where it looks like there could be a way around it, I just can’t wrap my head around it:

Is this possible to do?