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
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…