Skip to content

Commit

Permalink
#15 Fix bug if some features are not computed (nothing was returned)
Browse files Browse the repository at this point in the history
  • Loading branch information
poupou-web3 committed Aug 2, 2023
1 parent 7a6225b commit 4e7476f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sbscorer/sblegos/TransactionAnalyser.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,10 +645,11 @@ def get_df_features(self, list_features=None):
'details_first_outgoing_transaction']
if 'all' is passed, the lcs feature is added
Returns : pd.DataFrame
Returns
-------
df_features : pd.DataFrame
The data frame with the features
index : EOA all unique addresses in the df_transactions
-------
"""

Expand Down Expand Up @@ -701,12 +702,11 @@ def get_df_features(self, list_features=None):
if 'details_first_incoming_transaction' in list_features:
details_first_incoming_transaction = self.details_first_incoming_transaction
merge = df_features.merge(details_first_incoming_transaction, on='EOA', how='left')
else:
merge = df_features

if 'details_first_outgoing_transaction' in list_features:
details_first_outgoing_transaction = self.details_first_outgoing_transaction
merge = merge.merge(details_first_outgoing_transaction, on='EOA', how='left')

if 'details_first_incoming_transaction' not in list_features and 'details_first_outgoing_transaction' not in list_features:
merge = df_features

return merge

0 comments on commit 4e7476f

Please sign in to comment.