#原始数据为2行3列,行标01,列标abcdf = pandas.DataFrame(numpy.random.randn(2, 3), columns=['a', 'b', 'c'])#增加一列ddf['d'] = pandas.Series(numpy.random.randn(len(df['a'])), index=df.index)#增加一行2df.ix[2] = pandas.Series(numpy.random.rand(4),index=df.columns)