(with histogram you will get one bar, where as with bar you will get one bar per line of the dataframe).
Of course you can also do the groupby yourself and then call px.par or go.Bar:
import plotly.graph_objects as go
df = px.data.tips()
dfg = df.groupby('day')['tip'].sum()
fig = px.bar(x=dfg.index, y=dfg)
# also works with graph_objects:
# fig = go.Figure(go.Bar(x=dfg.index, y=dfg))
fig.show()