One - One Code All

Blog Content

python中pandas的series转换为dataframe,使用pandas.Series.to_frame

Python 统计学-科学计算   2015-01-17 22:05:11
>>> s = pd.Series(["a", "b", "c"],
...               name="vals")
>>> s.to_frame()
    vals
0   a
1    b
2   c



上一篇:python中pandas的dataframe行移动shift
下一篇:Pandas中merge合并Dataframe报错:merge on datetime64[ns] and object columns

The minute you think of giving up, think of the reason why you held on so long.