I would recommend using the labels keyword argument instead, as this also changes the hover text, and works no matter what you map the values to (i.e. if you want set color to value instead as you iterate through your explorations): https://plotly.com/python/styling-plotly-express/
import plotly.express as px
import pandas as pd
import numpy as np
import os
df = pd.read_csv(‘C:\test.csv’)
df_long=pd.melt(df , id_vars=[‘ID’])
fig = px.line(df_long, x=‘ID’, y=‘value’, color=‘variable’, labels={"value": "new label", "ID": "new label"})
fig.show()