Skip to content
Snippets Groups Projects
Commit 2163b33a authored by David Verelst's avatar David Verelst
Browse files

prepost.misc: do not fail on empty DataFrames

parent 94ae3471
No related branches found
No related tags found
1 merge request!106small prepost bug fixes
...@@ -1113,8 +1113,10 @@ def df_dict_check_datatypes(df_dict): ...@@ -1113,8 +1113,10 @@ def df_dict_check_datatypes(df_dict):
# we can not pop/delete items from a dict while iterating over it # we can not pop/delete items from a dict while iterating over it
df_dict2 = {} df_dict2 = {}
for colkey, col in df_dict.items(): for colkey, col in df_dict.items():
if len(col)==0:
pass
# if we have a list, convert to string # if we have a list, convert to string
if type(col[0]).__name__ == 'list': elif type(col[0]).__name__ == 'list':
for ii, item in enumerate(col): for ii, item in enumerate(col):
col[ii] = '**'.join(item) col[ii] = '**'.join(item)
# if we already have an array (statistics) or a list of numbers # if we already have an array (statistics) or a list of numbers
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment