<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tsplit(df, shape):
 """Split array into two parts."""

    if isinstance(df, (pd.DataFrame, pd.Series)):
        return df.iloc[0:shape], df.iloc[shape:]
    else:
        return df[0:shape], df[shape:]