I have two pandas dataframes.
noclickDF = DataFrame([[0,123,321],[0,1543,432]], columns=[\'click\', \'id\',\'location\'])
clickDF = DataFrame([[1,123,421],[1,154
You could also use pd.concat:
In [36]: pd.concat([noclickDF, clickDF], ignore_index=True)
Out[36]:
click id location
0 0 123 321
1 0 1543 432
2 1 421 123
3 1 436 1543
Under the hood, DataFrame.append
calls pd.concat
.
DataFrame.append
has code for handling various types of input, such as Series, tuples, lists and dicts. If you pass it a DataFrame, it passes straight through to pd.concat
, so using pd.concat
is a bit more direct.