Create data frame from figure

Hello,

Figure of dcc.Graph is created in the following way:
fig.add_trace(
go.Scatter(x=df[‘Date’], y=df[col[‘id’]], name=‘Column name’),
secondary_y=False,
)

How do I create a dataframe back from the figure object passed in the callback function as an Input?
Tha dataframe has the following format
Date | Column name

I would like to

  1. Create a dataframe from figure
  2. Modify/append the dataframe
  3. Return new figure

I will appreciate your help.
Thank you
EM