Skip to content

Commit

Permalink
[ENH] use sort_index instead deprecated sortlevel
Browse files Browse the repository at this point in the history
  • Loading branch information
brillliantz committed Jan 17, 2018
1 parent 00ada80 commit b456ce7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jaqs/data/dataview.py
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@ def append_df(self, df, field_name, is_quarterly=False):
#the_data = apply_in_subprocess(pd.merge, args=(the_data, df),
# kwargs={'left_index': True, 'right_index': True, 'how': 'left'}) # runs in *only* one process
the_data = pd.merge(the_data, df, left_index=True, right_index=True, how='left')
the_data = the_data.sortlevel(axis=1)
the_data = the_data.sort_index(axis=1)
#merge = the_data.join(df, how='left') # left: keep index of existing data unchanged
#sort_columns(the_data)

Expand Down Expand Up @@ -2211,7 +2211,7 @@ def append_df(self, df, field_name, is_quarterly=False):
#the_data = apply_in_subprocess(pd.merge, args=(the_data, df),
# kwargs={'left_index': True, 'right_index': True, 'how': 'left'}) # runs in *only* one process
the_data = pd.merge(the_data, df, left_index=True, right_index=True, how='left')
the_data = the_data.sortlevel(axis=1)
the_data = the_data.sort_index(axis=1)
#merge = the_data.join(df, how='left') # left: keep index of existing data unchanged
#sort_columns(the_data)

Expand Down Expand Up @@ -2260,7 +2260,7 @@ def append_df_symbol(self, df, symbol_name):
#the_data = apply_in_subprocess(pd.merge, args=(the_data, df),
# kwargs={'left_index': True, 'right_index': True, 'how': 'left'}) # runs in *only* one process
the_data = pd.merge(the_data, df, left_index=True, right_index=True, how='left')
the_data = the_data.sortlevel(axis=1)
the_data = the_data.sort_index(axis=1)
#merge = the_data.join(df, how='left') # left: keep index of existing data unchanged
#sort_columns(the_data)

Expand Down

0 comments on commit b456ce7

Please sign in to comment.