I have a pandas series
object x
Ezh2 2
Hmgb 7
Irf1 1
I want to save this as a dataframe with column names Gene and Count respectively I tried
x_df = pd.DataFrame(x,columns = ['Gene','count'])
but it does not work.The final form I want is
Gene Count
Ezh2 2
Hmgb 7
Irf1 1
Can you suggest how to do this