Can't get global list to change

242 Views Asked by At

My code:

def some_func():
     global values_list
     values_list.append([1,2,3,4])

if __name__ == '__main__':
     global values_list 
     values_list = []
     ...
     df.groupby(['Something',]).parallel_apply(some_func)
     print(values_list[:20])

Just an empty list is printed. I just don't understand what I am doing wrong!

0

There are 0 best solutions below