code: def tsplit(df, shape):
      
      if isinstance(df, (pd.DataFrame, pd.Series)):
          return df.iloc[0:shape], df.iloc[shape:]
      else:
          return df[0:shape], df[shape:]
docs: Split array into two parts.