guopengfa
发布于 2020-05-25 / 837 阅读 / 0 评论 / 0 点赞

pandas追加数据

import pandas as pd
import numpy as np

if name == 'main':
data1 = pd.DataFrame({
"key":range(1,10)
})
data2 = pd.DataFrame({
"key":range(2,20)
})
# print(data1)
# data1["cuter"] = pd.cut(data1["key"],[1,1,2,3],labels=["laben1","ceshi1","ceshi2"])
data1 = data1.append(data2)
print(data1)


评论