mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-12 02:58:49 +08:00
BUG: [mktplace]: fix sanitize_df to handle 1-row DFs
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user