I want left or right alignment of cell rows based on the condition like this image.
Here is what Iโve tried
import pandas as pd
import numpy as np
import plotly.graph_objects as go
df = pd.DataFrame(np.array(
[
["<b>INCOME STATEMENT</b>", ""],
["Revene", "$6952"],
["Cost of Goods Sold", "$4028"],
["GROSS PROFIT", "$3223"],
["OPERATING EXPENSES", "$2312"],
["Employee COst", "$2323"]
]
), columns=["statement", "result"])
fig = go.Figure(data=[go.Table(
cells=dict(values=[df.statement, df.result],
fill_color='#ffffff',
align=['left', "center"]))
])
fig.layout['template']['data']['table'][0]['header']['fill']['color']='rgba(0,0,0,0)'
fig.show()
but left or right I donโt have any idea. Please help me to create the desired chart.