Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
thinh-vu committed Jul 10, 2024
2 parents 6720503 + 837f48b commit 3cac673
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vnstock3/explorer/vci/trading.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ def price_board (self, symbols_list: List[str], to_df:Optional[bool]=True, show_
drop_columns = [('bid_ask', 'code'), ('bid_ask', 'symbol'), ('bid_ask', 'session'), ('bid_ask', 'received_time'), ('bid_ask', 'message_type'), ('bid_ask', 'time'), ('bid_ask', 'bid_prices'), ('bid_ask', 'ask_prices'),
('listing', 'code'), ('listing', 'exercise_price'), ('listing', 'exercise_ratio'), ('listing', 'maturity_date'), ('listing', 'underlying_symbol'), ('listing', 'issuer_name'), ('listing', 'received_time'), ('listing', 'message_type'), ('listing', 'en_organ_name'), ('listing', 'en_organ_short_name'), ('listing', 'organ_short_name'), ('listing', 'ticker'),
('match', 'code'), ('match', 'symbol'), ('match', 'received_time'), ('match', 'message_type'), ('match', 'time'), ('match', 'session')]
combine_df = combine_df.drop(columns=drop_columns)

# Drop columns only if they exist in the DataFrame
combine_df = combine_df.drop(columns=[col for col in drop_columns if col in combine_df.columns])

# rename column for board inside listing to exchange
combine_df = combine_df.rename(columns={'board': 'exchange'}, level=1)
Expand All @@ -86,4 +88,4 @@ def price_board (self, symbols_list: List[str], to_df:Optional[bool]=True, show_
if to_df:
return combine_df
else:
return data
return data

0 comments on commit 3cac673

Please sign in to comment.