Question: I have a sample series which I am including here for reproducible example:

```
data = np.array([190, 1, 470, 183, 131, 0, 333, 14, 82, 31])
ser = pd.Series(data, index=['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'])

```

I have written a function to detect outliers in this series with the following code:

```
def detect_outliers(data):
    q1, q3 = np.percentile(data, [25, 75])
    iqr = q3 - q1

    lower_bound = q1 - (iqr * 1.5)
    upper_bound = q3 + (iqr * 1.5)
    return np.where((data > upper_bound) > (data < lower_bound))

```

When I run this code on my series ***ser***, I get the following output:

[![enter image description here](https://i.stack.imgur.com/PQ5Eq.png)](https://i.stack.imgur.com/PQ5Eq.png)

I understand that this is referring to the data point with value 470 i.e. the ***3rd row*** (index=2). How can I get it to output the index 'C' instead of index 2?

Answer: 
### The shortcut item in your Drive has an attribute with the id of the actual folder.

If for example, you have only one shortcut to a folder in your Drive when you make the request you will get **two results** when listing all files in root.

1. one with mime type "shortcut" - which is the shortcut.
2. one with mime type "folder" - seems that the API lists this anyway.

If for any reason you only get the shortcut, you can get the details of the shortcut:

### Request

```
curl \
  'https://www.googleapis.com/drive/v3/files/[YOUR_SHORTCUT_ID]?fields=*&key=[YOUR_API_KEY]' \
  --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
  --header 'Accept: application/json' \
  --compressed

```

### Response

(I have removed most of the fields from the response)

```json
{
 "kind": "drive#file",
 "id": "[YOUR_SHORTCUT_ID]",
 "name": "[YOUR_SHORTCUT_NAME]",
 "mimeType": "application/vnd.google-apps.shortcut",
 "starred": false,
 "trashed": false,
 "shortcutDetails": {
  "targetId": "[THE_ACTUAL_FOLDER_ID]",
  "targetMimeType": "application/vnd.google-apps.folder"
 }
}

```

Within `shortcutDetails` is the `targetId`.

After which, you can write your original request with the proper `"ID" in parents`.

### Reference

* [Create a shortcut with Drive API](https://developers.google.com/drive/api/v3/shortcuts)
The shortcut is not synonymous with the directory it points to. You will need to make two requests, one to get the target ID ("targetId") from the shortcut and then a second call to find files with `targetId in parents`.