<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _nth(arr, n):
 """ Return the nth value of array If it is missing return NaN """

    try:
        return arr.iloc[n]
    except (KeyError, IndexError):
        return np.nan