Skip to content

Commit

Permalink
BUG: [mktplace]: fix sanitize_df to handle 1-row DFs
Browse files Browse the repository at this point in the history
  • Loading branch information
lacabra committed Mar 9, 2018
1 parent 1de084a commit 8f7d678
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion catalyst/marketplace/utils/bundle_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ def sanitize_df(df):
# large datasets
if len(df) > 100:
indexes = random.sample(range(0, len(df) - 1), 100)
else:
elif len(df) > 1:
indexes = range(0, len(df) - 1)
else:
indexes = [0, ]

for column in df.columns:
is_date = False
Expand Down

0 comments on commit 8f7d678

Please sign in to comment.