BUG: [mktplace]: fix sanitize_df to handle 1-row DFs

This commit is contained in:
Victor Grau Serrat
2018-03-09 12:44:01 -07:00
parent 1de084a08f
commit 8f7d678170
+3 -1
View File
@@ -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