Private
Public Access
1
0

small fix

This commit is contained in:
Sander Roosendaal
2022-11-27 10:57:03 +01:00
parent 4d8ec7eeae
commit e30be63577
2 changed files with 12 additions and 9 deletions

View File

@@ -1288,14 +1288,17 @@ def getsmallrowdata_db(columns, ids=[], doclean=True, workstrokesonly=True, comp
else:
df = pd.DataFrame()
if compute and len(df):
data = df.copy()
if doclean:
data = clean_df_stats(data, ignorehr=True,
workstrokesonly=workstrokesonly)
data.dropna(axis=1, how='all', inplace=True)
data.dropna(axis=0, how='any', inplace=True)
return data
try:
if compute and len(df):
data = df.copy()
if doclean:
data = clean_df_stats(data, ignorehr=True,
workstrokesonly=workstrokesonly)
data.dropna(axis=1, how='all', inplace=True)
data.dropna(axis=0, how='any', inplace=True)
return data
except TypeError:
pass
return df