Post date: Jan 30, 2015 9:50:03 PM
Here I want to initialize dataframe with unknown row numbers, running in for loop. I use
pd.concatexample showed below:
tmp = pd.DataFrame()for i in [1,2,3,4]: tmp_b = pd.DataFrame({'a':[i],'b':[str(i)]}) tmp = pd.concat([tmp,tmp_b],ignore_index=True, axis=0)tmp