Question: I have a dask dataframe, backed by parquet. It's 131million rows, when I do some basic operations on the whole frame they take a couple of minutes.

```
df = dd.read_parquet('data_*.pqt')
unique_locations = df.location.unique()
https = unique_locations.str.startswith('https:')
http = unique_locations.str.startswith('http:')
total_locations = len(unique_locations)
n_https = https.sum().compute()
n_http = http.sum().compute()

```

Time:

```
CPU times: user 2min 49s, sys: 23.9 s, total: 3min 13s
Wall time: 1min 53s

```

I naively thought that if I took a sample of the data that I could bring this time down, and did:

```
df = dd.read_parquet('data_*.pqt')
df = df.sample(frac=0.05)
unique_locations = df.location.unique()
https = unique_locations.str.startswith('https:')
http = unique_locations.str.startswith('http:')
total_locations = len(unique_locations)
n_https = https.sum().compute()
n_http = http.sum().compute()

```

Time:

```
Unknown, I stopped it after 45minutes.

```

I'm guessing that my sample can't be accessed efficiently for all my follow-on computations, but I don't know how to fix it. 

I'm interested in the best way to sample data from a dask dataframe and then work with that sample.

Answer: 
I am not sure what

```
 IOtherSomething<T> = IOtherInterface<TSomething<T>>;

```

is meant to achieve here. If you are trying to extend the interface you need something like

```
IOtherSomething<T> = interface(IOtherInterface<TSomething<T>>)
end;

```

which does compile in Delphi. I don't have Lazarus to test.

If this is not what you are trying to do I will delete the answer.

If it is, I will edit to remove these comments.
Afaik you should still declare IOtherInterface and later specialize it with TSomething . 

Generics.Collections works this way (with TPair in the role of TSomething ). 

Anyway, FPC fixes has a problem with double specializations, it sees >> or << as shift tokens. This is fixed in trunk