First some simple example code, after that my problem (code)":

```
mylist = [1,2,3,4]
type(mylist)
type(mylist[0])

while mylist:
    mylist.pop(-1)

```

result:

```
list
int
4
3
2
1

```

In reality a have a long function that takes data from a df wit 44K rows.

In my real function I make a list called: jaar.

```
jaar = list(df.jaar.unique())
    print(type(jaar))
    print(type(jaar[0]))

```

(to print statements are just for testing)
result:

```
<class 'list'>
<class 'numpy.int64'>

```

So.... based on the example code I wanted to use jaar.pop(0) in my function.
But.... this gives an Error:

```
AttributeError: 'numpy.int64' object has no attribute 'pop'

```

I wanted to change the type of the jaar list elements with

```
jaar.astype(int)

```

This gives:

```
AttributeError: 'list' object has no attribute 'astype'

```

then I tried this (found it on Stack and checked numpy.org):

```
jaar = np.dtype(object)

```

Result of this is:

```
KeyError: 'There are no fields in dtype object.'

```

So my question:

I make a list with:

```
jaar = list(df.jaar.unique())

```

result: [2016, 2017, 2018]

How to convert the values in jaar to values that can be popped like in the simple example. Basically: how to convert the numpy int64 to python integers so the pop() method works.

thank you all for helping me out! greetings Jan