using px, according to the official document, hover-info can be set as follows:
import plotly.express as px df_2007 = px.data.gapminder().query("year==2