标签: python python-3.x pandas dataframe split
我有:
df = pd.DataFrame({'Name':['Chris Iannetta', 'John Hicks'], 'Pos':['C', 'C/1B'], 'HR':[12, 4]})
我想要:
df_new = pd.DataFrame({'Name':['Chris Iannetta', 'John Hicks', 'John Hicks'], 'Pos':['C', 'C', '1B'], 'HR':[12, 4, 4]})
谢谢!