更新时间:2023-12-01 10:13:58
我首先创建一个熊猫系列,其中包含我想要的值和列。例如:
I would first create a pandas series that contain the values and columns I want. for example:
new_values= pd.Series(["a", "b"], index=["one", "two"])
然后我将该系列附加到原始数据框:
Then I would append this series to the original dataframe:
df= df.append(new_values, ignore_index=True)