Question: Lets say I have a dictionary:

```
episode = {
    "translations": [{
        "language": {
            "code": "de"
        },
        "title": "German"
    }, {
        "language": {
            "code": "en"
        },
        "title": "English"
    }, {
        "language": {
            "code": "fr"
        },
        "title": "French"
    }]
};

```

I would like to get specifically the list that matches a specific language code. I could walk through the entire dictionary using the following code:

```
            for translation in episode['translations']:
                if translation['language']['code'] == 'fr':
                    language = translation;
                    break;

```

But that seems a bit excessive, and a waste of resources. Is there a better way of doing this, without having to walk through the entire array?

Answer: 
There are many ways to do what you want.

Depending on the function in question, you may be able to apply it directly to the series. For example, calling `s + t` returns

```
0    37
1    40
2    23
dtype: int64

```

However, if your function is more complicated than simple arithmetic, you may need to get creative. One option is to use the built-in Python `map` function. For example, calling

`list(map(np.add, s, t))`

returns

`[37, 40, 23]`
If the two series have the same index, you can create a series with list comprehension:

```
result = pd.Series([foo(xs, xt) for xs,xt in zip(s,t)], index=s.index)

```

If you can't guarantee that the two series have the same index, concat is the way to go as it helps align the index.