Cannot Append Dataframes With Pandas 0.17.1 But Can With Pandas 0.14.1
I have two dataframes, c and h below c pickle file: http://s000.tinyupload.com/?file_id=64255815375060941529 h pickle file: http://s000.tinyupload.com/?file_id=98284988001290720556
Solution 1:
There is bug 11351 - not handled properly:
If you try add new column created_at
, which is missing in h
and concat
:
h['created_at'] = np.nan
new = pd.concat([h,c])
get error:
AttributeError: 'numpy.ndarray' object has no attribute 'tz_localize'
One solution is convert Datetime
to string
:
c['created_at'] = c['created_at'].astype(str)
new = pd.concat([h,c])
new['created_at'] = pd.to_datetime(new['created_at'])
Post a Comment for "Cannot Append Dataframes With Pandas 0.17.1 But Can With Pandas 0.14.1"