# Create data frame from figure

**URL:** <https://community.plotly.com/t/create-data-frame-from-figure/58987>\
**Category:** Dash Python\
**Created:** [December 3, 2021, 7:22pm UTC](https://community.plotly.com/t/create-data-frame-from-figure/58987 "2021-12-03T19:22:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![emilmajkowski](https://avatars.discourse-cdn.com/v4/letter/e/bc79bd/32.png) [@emilmajkowski](https://community.plotly.com/u/emilmajkowski)\
**Post date:** [December 3, 2021, 7:22pm UTC](https://community.plotly.com/t/create-data-frame-from-figure/58987/1 "2021-12-03T19:22:37Z")

</div>

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
