I created a subclass of pandas.DataFrame to bundle a few functionalities:
class ABT(pandas.DataFrame):
def __init__(self, data=None, ...):
if data is None:
...
data = DataFrame(..., tz='utc'))
super(ABT, self).__init__(data)
I want to make a method that uses another DataFrame as a parameter and appends it to ABT. The question is: How to join/merge/concat to self?
def add_df(self, new_df):
df_utc = new_df.tz_localize('CET', ambiguous='NaT').tz_convert('utc')
...
self.merge(df_utc , how='left', inplace=True)
The above method does not work, but I hope there is a ncie way to solve this.