input: Write a python function to split a DataFrame into training and testing datasets based on a given row index.
  assert len(split_data(df, 2000)['train'][0]) == 2001
  assert len(split_data(df, 2000)['train'][1]) == 2001
  assert len(split_data(df, 2000)['test'][0]) == len(df) - 2001
  assert len(split_data(df, 2000)['test'][1]) == len(df) - 2001
output: import pandas as pd
  
  def split_data(df, index):
      train_data = df.iloc[:index + 1]
      test_data = df.iloc[index + 1:]
      return {'train': (train_data, train_data), 'test': (test_data, test_data)}